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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/hardware_acceleration/WebappActivityHWATest.java

Issue 2863583002: Convert WebappActivityTestBase and direct children to JUnit4. (Closed)
Patch Set: Merge Created 3 years, 7 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/hardware_acceleration/WebappActivityHWATest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/hardware_acceleration/WebappActivityHWATest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/hardware_acceleration/WebappActivityHWATest.java
index 8bf4b0acf17a6c388869aeb150262abc254f029e..b90a15a762e43891b48d3dee3c1b37d042453205 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/hardware_acceleration/WebappActivityHWATest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/hardware_acceleration/WebappActivityHWATest.java
@@ -6,22 +6,37 @@ package org.chromium.chrome.browser.hardware_acceleration;
import android.support.test.filters.SmallTest;
+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.chrome.browser.ChromeSwitches;
import org.chromium.chrome.browser.webapps.WebappActivity;
-import org.chromium.chrome.browser.webapps.WebappActivityTestBase;
+import org.chromium.chrome.browser.webapps.WebappActivityTestRule;
+import org.chromium.chrome.test.ChromeActivityTestRule;
+import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
/**
* Tests that WebappActivity is hardware accelerated only high-end devices.
*/
-public class WebappActivityHWATest extends WebappActivityTestBase {
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- startWebappActivity();
+@RunWith(ChromeJUnit4ClassRunner.class)
+@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
+ ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG})
+public class WebappActivityHWATest {
+ @Rule
+ public final WebappActivityTestRule mActivityTestRule = new WebappActivityTestRule();
+
+ @Before
+ public void setUp() throws Exception {
+ mActivityTestRule.startWebappActivity();
}
+ @Test
@SmallTest
public void testHardwareAcceleration() throws Exception {
- WebappActivity activity = getActivity();
+ WebappActivity activity = mActivityTestRule.getActivity();
Utils.assertHardwareAcceleration(activity);
}
}

Powered by Google App Engine
This is Rietveld 408576698