| 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);
|
| }
|
| }
|
|
|