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 11cb83cbfe50850a15ac4e61c5310d2b14a042a1..2b09b4ff79b0b4e4a77045b709d3f4024955740c 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 |
@@ -1363,7 +1363,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro |
waitForPanelToPeek(); |
assertLoadedLowPriorityUrl(); |
clickNode("question-mark"); |
- waitForGestureProcessing(); |
+ waitForPanelToClose(); |
assertNull(getSelectedText()); |
} |
@@ -1408,8 +1408,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro |
clickWordNode("states-far"); |
waitForPanelToPeek(); |
clickNode("question-mark"); |
- waitForGestureProcessing(); |
- assertPanelClosedOrUndefined(); |
+ waitForPanelToClose(); |
assertNull(mSelectionController.getSelectedText()); |
} |
@@ -1438,9 +1437,8 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro |
assertEquals("States", getSelectedText()); |
waitForPanelToPeek(); |
clickNode("states-far"); |
- waitForGestureProcessing(); |
+ waitForPanelToClose(); |
assertNull(getSelectedText()); |
- assertPanelClosedOrUndefined(); |
clickNode("states-far"); |
waitForGestureProcessing(); |
waitForPanelToPeek(); |
@@ -2867,4 +2865,16 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro |
// Assert that the URL was loaded. |
ChromeTabUtils.waitForTabPageLoaded(getActivity().getActivityTab(), testUrl); |
} |
+ |
+ /** |
+ * Tests that the Manager cycles through all the expected Internal States on Tap and Long-press. |
+ */ |
+ @SmallTest |
+ @Feature({"ContextualSearch"}) |
+ public void testAllInternalStatesVisited() throws InterruptedException, TimeoutException { |
+ // Set up a tracking version of the Internal State Controller. |
+ |
+ // Simulate a tap that resolves to show the Bar. |
+ simulateTapSearch("search"); |
+ } |
} |