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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java

Issue 1786243003: Rename pollForCriteria to pollForTestThreadCriteria. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and update MediaRouterIntegrationTest.java 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
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) {

Powered by Google App Engine
This is Rietveld 408576698