Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(654)

Unified Diff: content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellActivityTestRule.java

Issue 2708243004: Auto convert content shell tests to JUnit4 (Closed)
Patch Set: Remove test that failed Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698