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

Unified Diff: content/shell/android/javatests/src/org/chromium/content_shell/ContentShellPreconditionsTest.java

Issue 11642050: [Android] Add test that asserts screen is on. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove network test Created 8 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/android/javatests/src/org/chromium/content_shell/ContentShellPreconditionsTest.java
diff --git a/content/shell/android/javatests/src/org/chromium/content_shell/ContentShellPreconditionsTest.java b/content/shell/android/javatests/src/org/chromium/content_shell/ContentShellPreconditionsTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..54b32032f59a5ee89f660b2d690ae69b24946a0a
--- /dev/null
+++ b/content/shell/android/javatests/src/org/chromium/content_shell/ContentShellPreconditionsTest.java
@@ -0,0 +1,25 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.content_shell;
+
+import android.content.Context;
+import android.os.PowerManager;
+import android.test.suitebuilder.annotation.Smoke;
+
+import org.chromium.base.test.util.Feature;
+
+/**
+ * Test that verifies preconditions for tests to run.
+ */
+public class ContentShellPreconditionsTest extends ContentShellTestBase {
+ @Smoke
+ @Feature({"TestInfrastructure"})
+ public void testScreenIsOn() throws Exception {
+ PowerManager pm = (PowerManager) getInstrumentation().getContext().getSystemService(
+ Context.POWER_SERVICE);
+
+ assertTrue("Many tests will fail if the screen is not on.", pm.isScreenOn());
+ }
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698