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

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

Issue 2739603003: Add TestRules for content shell test and refactor test bases (Closed)
Patch Set: Address +boliu's comments Created 3 years, 9 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/ContentShellTestBase.java
diff --git a/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java b/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java
index 8d1d738644f3e2d02c50568ac6da61d276be4926..ae8b821415b518120b4e09df8b475dde7b93a0dc 100644
--- a/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java
+++ b/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java
@@ -40,31 +40,6 @@ public class ContentShellTestBase extends BaseActivityInstrumentationTestCase<Co
mDelegate = new ContentShellTestCommon(this);
}
- @SuppressWarnings("deprecation")
- @Override
- public ContentShellActivity getActivityForTestCommon() {
- return getActivity();
- }
-
- @Override
- @SuppressWarnings("deprecation")
- public Instrumentation getInstrumentationForTestCommon() {
- return getInstrumentation();
- }
-
- @SuppressWarnings("deprecation")
- @Override
- public ContentShellActivity launchActivityWithIntentForTestCommon(Intent intent) {
- setActivityIntent(intent);
- return getActivity();
- }
-
- @SuppressWarnings("deprecation")
- @Override
- public void runOnUiThreadForTestCommon(Runnable runnable) throws Throwable {
- runTestOnUiThread(runnable);
- }
-
@Override
@SuppressWarnings("deprecation")
protected void setUp() throws Exception {
@@ -185,4 +160,49 @@ public class ContentShellTestBase extends BaseActivityInstrumentationTestCase<Co
+ " See ContentShellTestBase#runTest.", e);
}
}
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public ContentShellActivity getActivityForTestCommon() {
+ return getActivity();
+ }
+
+ @Override
+ @SuppressWarnings("deprecation")
+ public Instrumentation getInstrumentationForTestCommon() {
+ return getInstrumentation();
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public ContentShellActivity launchActivityWithIntentForTestCommon(Intent intent) {
+ setActivityIntent(intent);
+ return getActivity();
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public void runOnUiThreadForTestCommon(Runnable runnable) throws Throwable {
+ runTestOnUiThread(runnable);
+ }
+
+ @Override
+ public ContentViewCore getContentViewCoreForTestCommon() {
+ return getContentViewCore();
+ }
+
+ @Override
+ public WebContents getWebContentsForTestCommon() {
+ return getWebContents();
+ }
+
+ @Override
+ public void waitForActiveShellToBeDoneLoadingForTestCommon() {
+ waitForActiveShellToBeDoneLoading();
+ }
+
+ @Override
+ public ContentShellActivity launchContentShellWithUrlForTestCommon(String url) {
+ return launchContentShellWithUrl(url);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698