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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.hardware_acceleration; 5 package org.chromium.chrome.browser.hardware_acceleration;
6 6
7 import android.support.test.filters.SmallTest; 7 import android.support.test.filters.SmallTest;
8 8
9 import org.junit.Before;
10 import org.junit.Rule;
11 import org.junit.Test;
12 import org.junit.runner.RunWith;
13
14 import org.chromium.base.test.util.CommandLineFlags;
15 import org.chromium.chrome.browser.ChromeSwitches;
9 import org.chromium.chrome.browser.webapps.WebappActivity; 16 import org.chromium.chrome.browser.webapps.WebappActivity;
10 import org.chromium.chrome.browser.webapps.WebappActivityTestBase; 17 import org.chromium.chrome.browser.webapps.WebappActivityTestRule;
18 import org.chromium.chrome.test.ChromeActivityTestRule;
19 import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
11 20
12 /** 21 /**
13 * Tests that WebappActivity is hardware accelerated only high-end devices. 22 * Tests that WebappActivity is hardware accelerated only high-end devices.
14 */ 23 */
15 public class WebappActivityHWATest extends WebappActivityTestBase { 24 @RunWith(ChromeJUnit4ClassRunner.class)
16 @Override 25 @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
17 protected void setUp() throws Exception { 26 ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG})
18 super.setUp(); 27 public class WebappActivityHWATest {
19 startWebappActivity(); 28 @Rule
29 public final WebappActivityTestRule mActivityTestRule = new WebappActivityTe stRule();
30
31 @Before
32 public void setUp() throws Exception {
33 mActivityTestRule.startWebappActivity();
20 } 34 }
21 35
36 @Test
22 @SmallTest 37 @SmallTest
23 public void testHardwareAcceleration() throws Exception { 38 public void testHardwareAcceleration() throws Exception {
24 WebappActivity activity = getActivity(); 39 WebappActivity activity = mActivityTestRule.getActivity();
25 Utils.assertHardwareAcceleration(activity); 40 Utils.assertHardwareAcceleration(activity);
26 } 41 }
27 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698