/**
* Test case 1: This test case is for the power and general stability
* measurment. We don't need to do the validation. This test case simply
* play the mp3 for 30 seconds then stop.
* The sdcard should have the target mp3 files.
*/
@LargeTest
public void testPlay30sMP3() throws Exception {
// Launch the songs list. Pick the fisrt song and play
try {
Instrumentation inst = getInstrumentation();
//Make sure the song list shown up
Thread.sleep(2000);
inst.sendKeyDownUpSync(KeyEvent.KEYCODE_DPAD_DOWN);
mTrackList = getActivity().getListView();
int scrollCount = mTrackList.getMaxScrollAmount();
//Make sure there is at least one song in the sdcard
if (scrollCount != -1) {
inst.sendKeyDownUpSync(KeyEvent.KEYCODE_DPAD_CENTER);
} else {
assertTrue("testPlayMP3", false);
}
Thread.sleep(PLAY_TIME);
} catch (Exception e) {
assertTrue("testPlayMP3", false);
}
}
MusicPlayerStability.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:Android-Application-Using-CAF-Library
作者:
评论列表
文章目录