1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.platform.test.helpers; 18 19 import android.app.Instrumentation; 20 21 public abstract class AbstractTuneInHelper extends AbstractStandardAppHelper { 22 AbstractTuneInHelper(Instrumentation instr)23 public AbstractTuneInHelper(Instrumentation instr) { 24 super(instr); 25 } 26 27 /** 28 * Setup expectation: TuneIn app is open, originally on Browse Page 29 * 30 * This method attempts a few times until go back to Browse Page 31 * and assert fails if it doesn't end up on Browse Page 32 */ goToBrowsePage()33 public abstract void goToBrowsePage(); 34 35 /** 36 * Setup expectation: TuneIn is on Browse page 37 * 38 * This method blocks until on local radio page 39 */ goToLocalRadio()40 public abstract void goToLocalRadio(); 41 42 /** 43 * Setup expectation: TuneIn is on Local Radio page 44 * 45 * This method selects the ith FM from the radio list 46 * and goes to radio profile page 47 * @param i ith FM 48 */ selectFM(int i)49 public abstract void selectFM(int i); 50 51 /** 52 * Setup expectation: TuneIn is on radio profile page 53 * 54 * This method starts playing the radio channel 55 */ startChannel()56 public abstract void startChannel(); 57 58 /** 59 * Setup expectation: TuneIn is on channel page 60 * 61 * This method stops the channel and stays on the page 62 */ stopChannel()63 public abstract void stopChannel(); 64 } 65