| Index: content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellActivityTestRule.java
|
| diff --git a/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellActivityTestRule.java b/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellActivityTestRule.java
|
| index 793c661fa211cd4da3a0b5f6e3bcd6997f71dc9d..15f2e3b34c59a6240754dc3d67a1c2a31dce3c3e 100644
|
| --- a/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellActivityTestRule.java
|
| +++ b/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellActivityTestRule.java
|
| @@ -66,12 +66,14 @@ public class ContentShellActivityTestRule extends ActivityTestRule<ContentShellA
|
|
|
| @Override
|
| protected void beforeActivityLaunched() {
|
| + super.beforeActivityLaunched();
|
| assertScreenIsOn();
|
| }
|
|
|
| @TargetApi(Build.VERSION_CODES.KITKAT_WATCH)
|
| @SuppressWarnings("deprecation")
|
| private void assertScreenIsOn() {
|
| + Log.d("#YOLAND", "Asserting Screen is On");
|
| PowerManager pm = (PowerManager) InstrumentationRegistry.getContext().getSystemService(
|
| Context.POWER_SERVICE);
|
|
|
| @@ -80,6 +82,7 @@ public class ContentShellActivityTestRule extends ActivityTestRule<ContentShellA
|
| } else {
|
| Assert.assertTrue("Many tests will fail if the screen is not on.", pm.isScreenOn());
|
| }
|
| + Log.d("#YOLAND", "Done asserting");
|
| }
|
|
|
| /**
|
| @@ -96,6 +99,7 @@ public class ContentShellActivityTestRule extends ActivityTestRule<ContentShellA
|
| intent.setComponent(
|
| new ComponentName(InstrumentationRegistry.getInstrumentation().getTargetContext(),
|
| ContentShellActivity.class));
|
| + Log.d("#YOLAND", "Intent: " + intent.toString());
|
| return launchActivity(intent);
|
| }
|
|
|
| @@ -253,11 +257,6 @@ public class ContentShellActivityTestRule extends ActivityTestRule<ContentShellA
|
| });
|
| }
|
|
|
| - @Override
|
| - public Statement apply(Statement base, Description desc) {
|
| - return super.apply(base, desc);
|
| - }
|
| -
|
| /**
|
| * Annotation for tests that should be executed a second time after replacing
|
| * the ContentViewCore's container view.
|
|
|