Index: chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java |
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java |
index 275c701e5ee43a19131782654fab9060223803fd..25b5f2443406330ffa163b17bdbb81cdf7e568d9 100644 |
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java |
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java |
@@ -744,27 +744,26 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro |
} |
/** |
- * Waits for the selection to be dissolved. |
+ * Waits for the selection to be empty. |
* Use this method any time a test repeatedly establishes and dissolves a selection to ensure |
* that the selection has been completely dissolved before simulating the next selection event. |
* This is needed because the renderer's notification of a selection going away is async, |
* and a subsequent tap may think there's a current selection until it has been dissolved. |
*/ |
- private void waitForSelectionDissolved() throws InterruptedException { |
- CriteriaHelper.pollInstrumentationThread(new Criteria("Selection never dissolved.") { |
+ private void waitForSelectionEmpty() throws InterruptedException { |
+ CriteriaHelper.pollInstrumentationThread(new Criteria("Selection never empty.") { |
@Override |
public boolean isSatisfied() { |
- return !mSelectionController.isSelectionEstablished(); |
+ return mSelectionController.isSelectionEmpty(); |
} |
}, TEST_TIMEOUT, DEFAULT_POLLING_INTERVAL); |
} |
- |
/** |
* Waits for the panel to close and then waits for the selection to dissolve. |
*/ |
- private void waitForPanelToCloseAndSelectionDissolved() throws InterruptedException { |
+ private void waitForPanelToCloseAndSelectionEmpty() throws InterruptedException { |
waitForPanelToClose(); |
- waitForSelectionDissolved(); |
+ waitForSelectionEmpty(); |
} |
private void waitToPreventDoubleTapRecognition() throws InterruptedException { |
@@ -877,7 +876,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro |
private void clickToExpandAndClosePanel() throws InterruptedException, TimeoutException { |
clickWordNode("states"); |
tapBarToExpandAndClosePanel(); |
- waitForSelectionDissolved(); |
+ waitForSelectionEmpty(); |
} |
/** |
@@ -923,7 +922,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro |
simulateTapSearch("search"); |
waitForPanelToPeek(); |
closePanel(); |
- waitForPanelToCloseAndSelectionDissolved(); |
+ waitForPanelToCloseAndSelectionEmpty(); |
} |
/** |
@@ -938,7 +937,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro |
simulateLimitedTapSearch("search"); |
waitForPanelToPeek(); |
closePanel(); |
- waitForPanelToCloseAndSelectionDissolved(); |
+ waitForPanelToCloseAndSelectionEmpty(); |
} |
/** |
@@ -1255,7 +1254,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro |
assertLoadedNoUrl(); // No load after long-press until opening panel. |
clickNode("question-mark"); |
waitForGestureProcessing(); |
- waitForPanelToCloseAndSelectionDissolved(); |
+ waitForPanelToCloseAndSelectionEmpty(); |
assertNull(getSelectedText()); |
assertLoadedNoUrl(); |
} |
@@ -1343,7 +1342,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro |
clickWordNode("states-far"); |
waitForPanelToPeek(); |
clickNode("button"); |
- waitForPanelToCloseAndSelectionDissolved(); |
+ waitForPanelToCloseAndSelectionEmpty(); |
} |
/** |
@@ -1841,7 +1840,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro |
// Now we're at the limit, a tap should be ignored. |
clickNode("states"); |
- waitForPanelToCloseAndSelectionDissolved(); |
+ waitForPanelToCloseAndSelectionEmpty(); |
assertTapPromoCounterEnabledAt(2); |
// An open should disable the counter, but we need to use long-press (tap is now disabled). |
@@ -2076,7 +2075,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro |
mPolicy.setTapLimitForUndecidedForTesting(PLENTY_OF_TAPS); |
for (int i = 0; i < 50; i++) { |
clickToTriggerPrefetch(); |
- waitForSelectionDissolved(); |
+ waitForSelectionEmpty(); |
assertSearchTermRequested(); |
} |
} |