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

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

Issue 1837003002: Add null check to ImeLollipopTest to address flake (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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/public/android/javatests/src/org/chromium/content/browser/input/ImeLollipopTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeLollipopTest.java b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeLollipopTest.java
index 2d071f8d52ec3665dc82e0457f87134243abdea3..fbda1ca42d45ff26abe0031bcb5454b583d864a6 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeLollipopTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeLollipopTest.java
@@ -88,6 +88,11 @@ public class ImeLollipopTest extends ImeTest {
@Override
public boolean isSatisfied() {
CursorAnchorInfo info = mInputMethodManagerWrapper.getLastCursorAnchorInfo();
+ if (info != null && info.getComposingText() == null) {
+ updateFailureReason("info.getCompositingText() returned null");
+ return false;
+ }
+
String actual = (info == null ? "" : info.getComposingText().toString());
updateFailureReason("Expected: {" + expected + "}, Actual: {" + actual + "}");
return expected.equals(actual);
« 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