Commit a286b1bb authored by Tommy C. Li's avatar Tommy C. Li Committed by Commit Bot

Omnibox: Enable Steady State Elisions in tests by default.

Bug: 842236
Change-Id: Iba7afb45322ea3e446203274b2fe87bd6c80e9f9
Reviewed-on: https://chromium-review.googlesource.com/1178621Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Tommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584493}
parent 7dceb58d
......@@ -514,10 +514,9 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, FragmentUnescapedForDisplay) {
OmniboxView* view = nullptr;
ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view));
ui_test_utils::NavigateToURL(browser(),
GURL("https://www.google.com/#%E2%98%83"));
GURL("http://example.com/#%E2%98%83"));
EXPECT_EQ(view->GetText(),
base::UTF8ToUTF16("https://www.google.com/#\u2603"));
EXPECT_EQ(view->GetText(), base::UTF8ToUTF16("example.com/#\u2603"));
}
// Ensure that when the user navigates between suggestions, that the accessible
......@@ -537,6 +536,9 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, FriendlyAccessibleLabel) {
match.description = base::ASCIIToUTF16("Google");
match.allowed_to_be_default_match = true;
// Enter user input mode to prevent spurious unelision.
omnibox_view->model()->SetInputInProgress(true);
// Populate suggestions for the omnibox popup.
AutocompleteController* autocomplete_controller =
omnibox_view->model()->popup_model()->autocomplete_controller();
......@@ -561,6 +563,8 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, FriendlyAccessibleLabel) {
omnibox_view_views->OnTemporaryTextMaybeChanged(match_url, match, false,
false);
omnibox_view->SelectAll(true);
EXPECT_EQ(base::ASCIIToUTF16("https://google.com"),
omnibox_view_views->GetText());
// Test friendly label.
const int kFriendlyPrefixLength = match.description.size() + 1;
......@@ -589,6 +593,9 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, FriendlyAccessibleLabel) {
set_selection_action_data.anchor_offset = kFriendlyPrefixLength + 3;
omnibox_view_views->HandleAccessibleAction(set_selection_action_data);
EXPECT_EQ(base::ASCIIToUTF16("https://google.com"),
omnibox_view_views->GetText());
// Type "x" to replace the selected "tt" with that character.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_X, false,
false, false, false));
......
......@@ -2878,6 +2878,7 @@
"OmniboxRichEntitySuggestions",
"OmniboxTabSwitchSuggestions",
"OmniboxTailSuggestions",
"OmniboxUIExperimentHideSteadyStateUrlSchemeAndSubdomains",
"OmniboxUIExperimentShowSuggestionFavicons",
"OmniboxUIExperimentSwapTitleAndUrl",
"OmniboxUIExperimentVerticalMargin",
......
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