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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/services/GoogleServicesManagerIntegrationTest.java

Issue 2831823003: Convert ChromeActivityTestCaseBase direct children to JUnit4 (Closed)
Patch Set: rebase and convert newly added test Created 3 years, 8 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: chrome/android/javatests/src/org/chromium/chrome/browser/services/GoogleServicesManagerIntegrationTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/services/GoogleServicesManagerIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/services/GoogleServicesManagerIntegrationTest.java
index b73c7777bc6feb353feb8425e406527ff7f1c2d7..9ebae05725ba4e02637060729f6e81dc887289c2 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/services/GoogleServicesManagerIntegrationTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/services/GoogleServicesManagerIntegrationTest.java
@@ -4,35 +4,45 @@
package org.chromium.chrome.browser.services;
-import android.test.UiThreadTest;
+import android.support.test.annotation.UiThreadTest;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.chrome.browser.ChromeActivity;
-import org.chromium.chrome.test.ChromeActivityTestCaseBase;
+import org.chromium.chrome.browser.ChromeSwitches;
+import org.chromium.chrome.test.ChromeActivityTestRule;
+import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
/**
* Google Services Manager tests
*/
-public class GoogleServicesManagerIntegrationTest
- extends ChromeActivityTestCaseBase<ChromeActivity> {
-
- public GoogleServicesManagerIntegrationTest() {
- super(ChromeActivity.class);
- }
+@RunWith(ChromeJUnit4ClassRunner.class)
+@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
+ ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG})
+public class GoogleServicesManagerIntegrationTest {
+ @Rule
+ public ChromeActivityTestRule<ChromeActivity> mActivityTestRule =
+ new ChromeActivityTestRule<>(ChromeActivity.class);
/**
* Test changing the state of auto login
* @SmallTest
* @Feature({"Sync", "Main"})
*/
+ @Test
@DisabledTest(message = "crbug.com/413289")
@UiThreadTest
public void testSetAutologinState() {
// TODO(acleung): Add back some sort of test for the GSM.
}
- @Override
- public void startMainActivity() throws InterruptedException {
- startMainActivityOnBlankPage();
+ @Before
+ public void setUp() throws InterruptedException {
+ mActivityTestRule.startMainActivityOnBlankPage();
}
}

Powered by Google App Engine
This is Rietveld 408576698