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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java

Issue 2465053002: Asserting screen is on for all content shell tests (Closed)
Patch Set: Created 4 years, 1 month 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 | content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
index 132a8c9f2de3a3aa3e75e88e7f03a6c91e8be1d3..4dad75455237834b10fc241c89291a79c8d6caee 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
@@ -4,16 +4,13 @@
package org.chromium.content.browser.input;
-import android.annotation.TargetApi;
import android.app.Activity;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.res.Configuration;
-import android.os.Build;
import android.os.Handler;
import android.os.Looper;
-import android.os.PowerManager;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
import android.text.InputType;
@@ -101,8 +98,6 @@ public class ImeTest extends ContentShellTestBase {
DOMUtils.waitForNonZeroNodeBounds(mWebContents, "input_text");
boolean result = DOMUtils.clickNode(this, mContentViewCore, "input_text");
- // TODO(yabinh): Sometimes |result| is false. We suspect it's because the screen is locked.
- if (!result) assertScreenIsOn();
assertEquals("Failed to dispatch touch event.", true, result);
assertWaitForKeyboardStatus(true);
@@ -123,19 +118,6 @@ public class ImeTest extends ContentShellTestBase {
resetAllStates();
}
- @TargetApi(Build.VERSION_CODES.KITKAT_WATCH)
- @SuppressWarnings("deprecation")
- private void assertScreenIsOn() {
- PowerManager pm = (PowerManager) getInstrumentation().getContext().getSystemService(
- Context.POWER_SERVICE);
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) {
- assertTrue("Many tests will fail if the screen is not on.", pm.isInteractive());
- } else {
- assertTrue("Many tests will fail if the screen is not on.", pm.isScreenOn());
- }
- }
-
@MediumTest
@Feature({"TextInput", "Main"})
public void testKeyboardDismissedAfterClickingGo() throws Throwable {
« no previous file with comments | « no previous file | content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698