Commit 71f44efe authored by Emily Stark's avatar Emily Stark Committed by Commit Bot

Add test configs for URL display experiments

This CL adds test configs for the URL display experiment group that
launches all three URL display experiments and SafeBrowsing Delayed
Warnings.

SafeBrowsingDelayedWarnings was launched standalone for M85. In M86 and
above, it's launched with the other URL display experiments. It's also
no longer launched on Android as the URL display experiments aren't
implemented on Android.

The CL also removes a couple of obsolete configs so that the bots
don't hit the command line length limit.

Bug: 1111429
Change-Id: I037fb3a456a31d7617516eb7ad554ec1a02f4d6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2399563Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Commit-Queue: Emily Stark <estark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806380}
parent 663ff78e
......@@ -1162,10 +1162,7 @@ IN_PROC_BROWSER_TEST_F(LocalNTPTest, PendingNavigations) {
// Verify that the omnibox displays |slow_url|.
OmniboxView* view = browser()->window()->GetLocationBar()->GetOmniboxView();
std::string omnibox_text = base::UTF16ToUTF8(view->GetText());
EXPECT_THAT(omnibox_text, ::testing::StartsWith(slow_url.host()));
EXPECT_THAT(omnibox_text, ::testing::EndsWith(slow_url.path()));
EXPECT_THAT(slow_url.spec(), ::testing::EndsWith(omnibox_text));
EXPECT_EQ(base::ASCIIToUTF16(slow_url.spec()), view->GetText());
}
// Verifies that Chrome won't spawn a separate renderer process for
......
......@@ -536,7 +536,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, FragmentUnescapedForDisplay) {
ui_test_utils::NavigateToURL(browser(),
GURL("http://example.com/#%E2%98%83"));
EXPECT_EQ(view->GetText(), base::UTF8ToUTF16("example.com/#\u2603"));
EXPECT_EQ(view->GetText(), base::UTF8ToUTF16("http://example.com/#\u2603"));
}
// Ensure that when the user navigates between suggestions, that the accessible
......@@ -725,23 +725,29 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, AlwaysShowFullURLs) {
static_cast<OmniboxViewViews*>(omnibox_view);
ASSERT_TRUE(embedded_test_server()->Start());
GURL url = embedded_test_server()->GetURL("/title1.html");
// Use a hostname ("a.test") since IP addresses aren't eligible for eliding.
GURL url = embedded_test_server()->GetURL("a.test", "/title1.html");
base::string16 url_text = base::ASCIIToUTF16(url.spec());
ui_test_utils::NavigateToURL(browser(), url);
// By default, the elided URL should be shown.
EXPECT_EQ(url_text,
base::ASCIIToUTF16("http://") + omnibox_view_views->GetText());
// By default, the URL should be elided by pushing the scheme out of the
// display area.
EXPECT_EQ(url_text, omnibox_view_views->GetText());
EXPECT_GT(0,
omnibox_view_views->GetRenderText()->GetUpdatedDisplayOffset().x());
// After toggling the setting, the full URL should be shown.
chrome::ToggleShowFullURLs(browser());
EXPECT_EQ(url_text, omnibox_view_views->GetText());
EXPECT_EQ(0,
omnibox_view_views->GetRenderText()->GetUpdatedDisplayOffset().x());
// Toggling the setting again should go back to the elided URL.
chrome::ToggleShowFullURLs(browser());
EXPECT_EQ(url_text,
base::ASCIIToUTF16("http://") + omnibox_view_views->GetText());
EXPECT_EQ(url_text, omnibox_view_views->GetText());
EXPECT_GT(0,
omnibox_view_views->GetRenderText()->GetUpdatedDisplayOffset().x());
}
// The following set of tests require UIA accessibility support, which only
......
......@@ -6098,28 +6098,6 @@
]
}
],
"SafeBrowsingDelayedWarnings": [
{
"platforms": [
"android",
"chromeos",
"linux",
"mac",
"windows"
],
"experiments": [
{
"name": "Enabled",
"params": {
"mouse": "true"
},
"enable_features": [
"SafeBrowsingDelayedWarnings"
]
}
]
}
],
"SafeBrowsingEnhancedProtectionAndroid": [
{
"platforms": [
......@@ -6502,6 +6480,27 @@
]
}
],
"SimplifiedUrlDisplay": [
{
"platforms": [
"chromeos",
"linux",
"mac",
"windows"
],
"experiments": [
{
"name": "AllDisplayExperimentsEnabled",
"enable_features": [
"OmniboxUIExperimentElideToRegistrableDomain",
"OmniboxUIExperimentHideSteadyStateUrlPathQueryAndRefOnInteraction",
"OmniboxUIExperimentRevealSteadyStateUrlPathQueryAndRefOnHover",
"SafeBrowsingDelayedWarnings"
]
}
]
}
],
"SmartDimModelV3": [
{
"platforms": [
......
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