aboutsummaryrefslogtreecommitdiff
path: root/tests/jank/src/com/android/tv/tests/jank/ProgramGuideJankTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/jank/src/com/android/tv/tests/jank/ProgramGuideJankTest.java')
-rw-r--r--tests/jank/src/com/android/tv/tests/jank/ProgramGuideJankTest.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/jank/src/com/android/tv/tests/jank/ProgramGuideJankTest.java b/tests/jank/src/com/android/tv/tests/jank/ProgramGuideJankTest.java
index 7d751c4c..03796cfa 100644
--- a/tests/jank/src/com/android/tv/tests/jank/ProgramGuideJankTest.java
+++ b/tests/jank/src/com/android/tv/tests/jank/ProgramGuideJankTest.java
@@ -30,7 +30,6 @@ import com.android.tv.testing.uihelper.ByResource;
import com.android.tv.testing.uihelper.Constants;
import com.android.tv.testing.uihelper.LiveChannelsUiDeviceHelper;
import com.android.tv.testing.uihelper.MenuHelper;
-import com.android.tv.testing.uihelper.UiDeviceUtils;
/**
* Jank tests for the program guide.
@@ -83,7 +82,7 @@ public class ProgramGuideJankTest extends JankTestBase {
}
@JankTest(expectedFrames = EXPECTED_FRAMES,
- beforeLoop = "showProgramGuide",
+ beforeLoop = "showAndFocusProgramGuide",
afterLoop = "clearProgramGuide")
@GfxMonitor(processName = Utils.LIVE_CHANNELS_PROCESS_NAME)
public void testScrollDown() {
@@ -95,7 +94,7 @@ public class ProgramGuideJankTest extends JankTestBase {
}
@JankTest(expectedFrames = EXPECTED_FRAMES,
- beforeLoop = "showProgramGuide",
+ beforeLoop = "showAndFocusProgramGuide",
afterLoop = "clearProgramGuide")
@GfxMonitor(processName = Utils.LIVE_CHANNELS_PROCESS_NAME)
public void testScrollRight() {
@@ -128,11 +127,17 @@ public class ProgramGuideJankTest extends JankTestBase {
assertWaitForCondition(mDevice, Until.gone(Constants.PROGRAM_GUIDE));
}
- // It's public to be used with @JankTest annotation.
public void showProgramGuide() {
selectProgramGuideMenuItem();
mDevice.pressDPadCenter();
assertWaitForCondition(mDevice, Until.hasObject(Constants.PROGRAM_GUIDE));
+ }
+
+ // It's public to be used with @JankTest annotation.
+ public void showAndFocusProgramGuide() {
+ selectProgramGuideMenuItem();
+ mDevice.pressDPadCenter();
+ assertWaitForCondition(mDevice, Until.hasObject(Constants.PROGRAM_GUIDE));
// If the side panel grid is visible (and thus has focus), move right to clear it.
if (mDevice.hasObject(
ByResource.id(mTargetResources, R.id.program_guide_side_panel_grid_view))) {