Index: chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java |
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java b/chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java |
index b12dcdd1371f45d3b5df4f2576add884e55dbd29..1c8995e4e7cf5364c1edcce00fd278274122827a 100644 |
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java |
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java |
@@ -188,7 +188,7 @@ public class DocumentModeTestBase extends MultiActivityTestBase { |
ApplicationTestUtils.waitUntilChromeInForeground(); |
// Wait until the selector is ready and the Tabs have been added to the DocumentTabModel. |
- CriteriaHelper.pollForCriteria(new Criteria() { |
+ CriteriaHelper.pollInstrumentationThread(new Criteria() { |
@Override |
public boolean isSatisfied() { |
if (!ChromeApplication.isDocumentTabModelSelectorInitializedForTests()) { |
@@ -229,7 +229,7 @@ public class DocumentModeTestBase extends MultiActivityTestBase { |
openLinkInNewTabViaContextMenu(false, false); |
- CriteriaHelper.pollForUIThreadCriteria(new Criteria() { |
+ CriteriaHelper.pollUiThread(new Criteria() { |
@Override |
public boolean isSatisfied() { |
if (expectedTabCount != tabModel.getCount()) return false; |
@@ -273,7 +273,7 @@ public class DocumentModeTestBase extends MultiActivityTestBase { |
} |
}); |
TouchCommon.longPressView(view); |
- CriteriaHelper.pollForUIThreadCriteria(new Criteria() { |
+ CriteriaHelper.pollUiThread(new Criteria() { |
@Override |
public boolean isSatisfied() { |
return observer.mContextMenu != null; |
@@ -310,7 +310,7 @@ public class DocumentModeTestBase extends MultiActivityTestBase { |
protected void switchToTab(final Tab tab) throws Exception { |
final TabModel tabModel = |
ChromeApplication.getDocumentTabModelSelector().getCurrentModel(); |
- CriteriaHelper.pollForCriteria(new Criteria() { |
+ CriteriaHelper.pollInstrumentationThread(new Criteria() { |
@Override |
public boolean isSatisfied() { |
// http://crbug.com/509866: TabModelUtils#setIndex() sometimes fails. |