Index: chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java |
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java |
index a581a01d9c3b25106965bf01d200a2c2983bc3b3..69f513316b8267c835326258039edd1b71ef7917 100644 |
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java |
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java |
@@ -305,7 +305,7 @@ public class AutofillPopupTest extends ChromeActivityTestCaseBase<ChromeActivity |
private void waitForKeyboardShowRequest(final TestInputMethodManagerWrapper immw, |
final int count) throws InterruptedException { |
- CriteriaHelper.pollForUIThreadCriteria( |
+ CriteriaHelper.pollUiThread( |
Criteria.equals(count, new Callable<Integer>() { |
@Override |
public Integer call() { |
@@ -315,7 +315,7 @@ public class AutofillPopupTest extends ChromeActivityTestCaseBase<ChromeActivity |
} |
private void waitForAnchorViewAdd(final ViewGroup view) throws InterruptedException { |
- CriteriaHelper.pollForUIThreadCriteria(new Criteria( |
+ CriteriaHelper.pollUiThread(new Criteria( |
"Autofill Popup anchor view was never added.") { |
@Override |
public boolean isSatisfied() { |
@@ -325,7 +325,7 @@ public class AutofillPopupTest extends ChromeActivityTestCaseBase<ChromeActivity |
} |
private void waitForAutofillPopopShow(final AutofillPopup popup) throws InterruptedException { |
- CriteriaHelper.pollForUIThreadCriteria( |
+ CriteriaHelper.pollUiThread( |
new Criteria("Autofill Popup anchor view was never added.") { |
@Override |
public boolean isSatisfied() { |
@@ -337,19 +337,20 @@ public class AutofillPopupTest extends ChromeActivityTestCaseBase<ChromeActivity |
} |
private void waitForInputFieldFill(final WebContents webContents) throws InterruptedException { |
- CriteriaHelper.pollForCriteria(new Criteria("First name field was never filled.") { |
- @Override |
- public boolean isSatisfied() { |
- try { |
- return TextUtils.equals(FIRST_NAME, |
- DOMUtils.getNodeValue(webContents, "fn")); |
- } catch (InterruptedException e) { |
- return false; |
- } catch (TimeoutException e) { |
- return false; |
- } |
- } |
- }); |
+ CriteriaHelper.pollInstrumentationThread( |
+ new Criteria("First name field was never filled.") { |
+ @Override |
+ public boolean isSatisfied() { |
+ try { |
+ return TextUtils.equals(FIRST_NAME, |
+ DOMUtils.getNodeValue(webContents, "fn")); |
+ } catch (InterruptedException e) { |
+ return false; |
+ } catch (TimeoutException e) { |
+ return false; |
+ } |
+ } |
+ }); |
} |
private void assertLogged(String autofilledValue, String profileFullName) { |