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

Side by Side Diff: content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellPreconditionsTest.java

Issue 2708243004: Auto convert content shell tests to JUnit4 (Closed)
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 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.content_shell_apk; 5 package org.chromium.content_shell_apk;
6 6
7 import android.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.content.Context; 8 import android.content.Context;
9 import android.os.Build; 9 import android.os.Build;
10 import android.os.PowerManager; 10 import android.os.PowerManager;
11 import android.support.test.InstrumentationRegistry; 11 import android.support.test.InstrumentationRegistry;
(...skipping 20 matching lines...) Expand all
32 PowerManager pm = (PowerManager) InstrumentationRegistry.getContext().ge tSystemService( 32 PowerManager pm = (PowerManager) InstrumentationRegistry.getContext().ge tSystemService(
33 Context.POWER_SERVICE); 33 Context.POWER_SERVICE);
34 34
35 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) { 35 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) {
36 Assert.assertTrue("Many tests will fail if the screen is not on.", p m.isInteractive()); 36 Assert.assertTrue("Many tests will fail if the screen is not on.", p m.isInteractive());
37 } else { 37 } else {
38 Assert.assertTrue("Many tests will fail if the screen is not on.", p m.isScreenOn()); 38 Assert.assertTrue("Many tests will fail if the screen is not on.", p m.isScreenOn());
39 } 39 }
40 } 40 }
41 } 41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698