Commit e45c305d authored by Donn Denman's avatar Donn Denman Committed by Commit Bot

[TTS] Add a test for dictionary definitions.

Adds a test to exercise the UI when a dictionary definition is
returned by the server.

BUG=936695

Change-Id: I1b18ab395a402948377d541e828e14f51f170fe4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1573862
Commit-Queue: Donn Denman <donnd@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652673}
parent f60a2b02
...@@ -2983,6 +2983,28 @@ public class ContextualSearchManagerTest { ...@@ -2983,6 +2983,28 @@ public class ContextualSearchManagerTest {
mActivityTestRule.getActivity().getActivityTab(), testUrl); mActivityTestRule.getActivity().getActivityTab(), testUrl);
} }
/**
* Tests that the flow for showing a dictionary definition works, and that tapping in the
* bar just opens the panel instead of taking some action.
*/
@Test
@SmallTest
@Feature({"ContextualSearch"})
public void testDictionaryDefinition() throws InterruptedException, TimeoutException {
// Simulate a tap to show the Bar, then set the quick action data.
simulateTapSearch("search");
TestThreadUtils.runOnUiThreadBlocking(
()
-> mPanel.onSearchTermResolved("obscure · əbˈskyo͝or", null, null,
QuickActionCategory.NONE, CardTag.CT_DEFINITION));
// Tap on the main portion of the bar.
clickPanelBar();
// The panel should just expand open.
waitForPanelToExpand();
}
/** /**
* Tests accessibility mode: Tap and Long-press don't activate CS. * Tests accessibility mode: Tap and Long-press don't activate CS.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment