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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java

Issue 2703473002: [TTS] Extract tapped text before showing UI. (Closed)
Patch Set: Reworked icing notification, lots of cleanup, and a rebase. Created 3 years, 8 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/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");
+ }
}

Powered by Google App Engine
This is Rietveld 408576698