Commit 252c9269 authored by Ryan Sturm's avatar Ryan Sturm Committed by Commit Bot

Purging hint cache at start-up in browser tests (and removing tests from chromeos bots)

Based on logging (see earlier patchsets), it appears the existing data
base can cause the test update to be thrown out resulting in test
failures. It seems flakey whether the data base is persisted, so
purging it will likely fix many flakes.

Secondly, I am turning the tests off on chromeOS there are some dependencies
on file reads that seem to be flaky on ChromeOS, so it's easier to turn them
off.

Change-Id: I9535e7c6d855bdb7573a0c0e03868699dabcdf88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1497368Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Commit-Queue: Ryan Sturm <ryansturm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637896}
parent dfea4f3e
...@@ -238,6 +238,13 @@ class PreviewsNoScriptBrowserTest : public PreviewsBrowserTest { ...@@ -238,6 +238,13 @@ class PreviewsNoScriptBrowserTest : public PreviewsBrowserTest {
PreviewsBrowserTest::SetUp(); PreviewsBrowserTest::SetUp();
} }
void SetUpCommandLine(base::CommandLine* cmd) override {
cmd->AppendSwitch("enable-spdy-proxy-auth");
cmd->AppendSwitch("optimization-guide-disable-installer");
cmd->AppendSwitch("purge_hint_cache_store");
cmd->AppendSwitch(previews::switches::kIgnorePreviewsBlacklist);
}
// Creates hint data for the |hint_setup_url|'s host and then performs a // Creates hint data for the |hint_setup_url|'s host and then performs a
// navigation to |hint_setup_url| to trigger the hints to be loaded into the // navigation to |hint_setup_url| to trigger the hints to be loaded into the
// hint cache so they will be available for a subsequent navigation to a test // hint cache so they will be available for a subsequent navigation to a test
...@@ -283,24 +290,17 @@ class PreviewsNoScriptBrowserTest : public PreviewsBrowserTest { ...@@ -283,24 +290,17 @@ class PreviewsNoScriptBrowserTest : public PreviewsBrowserTest {
test_hints_component_creator_; test_hints_component_creator_;
}; };
// Previews InfoBar (which these tests triggers) does not work on Mac. #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
// See https://crbug.com/782322 for detail. #define DISABLE_ON_WIN_MAC_CHROMESOS(x) DISABLED_##x
// Also occasional flakes on win7 (https://crbug.com/789542).
#if defined(OS_ANDROID) || defined(OS_LINUX)
#define MAYBE_NoScriptPreviewsEnabled NoScriptPreviewsEnabled
#define MAYBE_NoScriptPreviewsEnabledHttpRedirectToHttps \
NoScriptPreviewsEnabledHttpRedirectToHttps
#else #else
#define MAYBE_NoScriptPreviewsEnabled DISABLED_NoScriptPreviewsEnabled #define DISABLE_ON_WIN_MAC_CHROMESOS(x) x
#define MAYBE_NoScriptPreviewsEnabledHttpRedirectToHttps \
DISABLED_NoScriptPreviewsEnabledHttpRedirectToHttps
#endif #endif
// Loads a webpage that has both script and noscript tags and also requests // Loads a webpage that has both script and noscript tags and also requests
// a script resource. Verifies that the noscript tag is evaluated and the // a script resource. Verifies that the noscript tag is evaluated and the
// script resource is not loaded. // script resource is not loaded.
IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest, IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest,
MAYBE_NoScriptPreviewsEnabled) { DISABLE_ON_WIN_MAC_CHROMESOS(NoScriptPreviewsEnabled)) {
GURL url = https_url(); GURL url = https_url();
// Whitelist NoScript for https_hint_setup_url()'s' host. // Whitelist NoScript for https_hint_setup_url()'s' host.
...@@ -318,8 +318,9 @@ IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest, ...@@ -318,8 +318,9 @@ IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest,
"Previews.InfoBarAction.NoScript", 1); "Previews.InfoBarAction.NoScript", 1);
} }
IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest, IN_PROC_BROWSER_TEST_F(
NoScriptPreviewsEnabledButHttpRequest) { PreviewsNoScriptBrowserTest,
DISABLE_ON_WIN_MAC_CHROMESOS(NoScriptPreviewsEnabledButHttpRequest)) {
GURL url = http_url(); GURL url = http_url();
// Whitelist NoScript for http_hint_setup_url() host. // Whitelist NoScript for http_hint_setup_url() host.
...@@ -332,17 +333,9 @@ IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest, ...@@ -332,17 +333,9 @@ IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest,
EXPECT_FALSE(noscript_css_requested()); EXPECT_FALSE(noscript_css_requested());
} }
// Flaky in all platforms except Android. See https://crbug.com/803626 for
// detail.
#if defined(OS_ANDROID) || defined(OS_LINUX)
#define MAYBE_NoScriptPreviewsEnabledButNoTransformDirective \
NoScriptPreviewsEnabledButNoTransformDirective
#else
#define MAYBE_NoScriptPreviewsEnabledButNoTransformDirective \
DISABLED_NoScriptPreviewsEnabledButNoTransformDirective
#endif
IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest, IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest,
MAYBE_NoScriptPreviewsEnabledButNoTransformDirective) { DISABLE_ON_WIN_MAC_CHROMESOS(
NoScriptPreviewsEnabledButNoTransformDirective)) {
GURL url = https_no_transform_url(); GURL url = https_no_transform_url();
// Whitelist NoScript for https_hint_setup_url()'s' host. // Whitelist NoScript for https_hint_setup_url()'s' host.
...@@ -359,8 +352,9 @@ IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest, ...@@ -359,8 +352,9 @@ IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest,
"Previews.CacheControlNoTransform.BlockedPreview", 5 /* NoScript */, 1); "Previews.CacheControlNoTransform.BlockedPreview", 5 /* NoScript */, 1);
} }
IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest, IN_PROC_BROWSER_TEST_F(
MAYBE_NoScriptPreviewsEnabledHttpRedirectToHttps) { PreviewsNoScriptBrowserTest,
DISABLE_ON_WIN_MAC_CHROMESOS(NoScriptPreviewsEnabledHttpRedirectToHttps)) {
GURL url = redirect_url(); GURL url = redirect_url();
// Whitelist NoScript for http_hint_setup_url() host. // Whitelist NoScript for http_hint_setup_url() host.
...@@ -378,16 +372,9 @@ IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest, ...@@ -378,16 +372,9 @@ IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest,
"Previews.InfoBarAction.NoScript", 1); "Previews.InfoBarAction.NoScript", 1);
} }
// Flaky in all platforms except Android. See https://crbug.com/803626 for IN_PROC_BROWSER_TEST_F(
// detail. PreviewsNoScriptBrowserTest,
#if defined(OS_ANDROID) || defined(OS_LINUX) DISABLE_ON_WIN_MAC_CHROMESOS(NoScriptPreviewsRecordsOptOut)) {
#define MAYBE_NoScriptPreviewsRecordsOptOut NoScriptPreviewsRecordsOptOut
#else
#define MAYBE_NoScriptPreviewsRecordsOptOut \
DISABLED_NoScriptPreviewsRecordsOptOut
#endif
IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest,
MAYBE_NoScriptPreviewsRecordsOptOut) {
GURL url = redirect_url(); GURL url = redirect_url();
// Whitelist NoScript for http_hint_setup_url()'s' host. // Whitelist NoScript for http_hint_setup_url()'s' host.
...@@ -412,20 +399,9 @@ IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest, ...@@ -412,20 +399,9 @@ IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest,
1); 1);
} }
// Previews InfoBar (which this test triggers) does not work on Mac. IN_PROC_BROWSER_TEST_F(
// See https://crbug.com/782322 for detail. PreviewsNoScriptBrowserTest,
// Also occasional flakes on win7 (https://crbug.com/789948) and Ubuntu 16.04 DISABLE_ON_WIN_MAC_CHROMESOS(NoScriptPreviewsEnabledByWhitelist)) {
// (https://crbug.com/831838)
#if defined(OS_ANDROID)
#define MAYBE_NoScriptPreviewsEnabledByWhitelist \
NoScriptPreviewsEnabledByWhitelist
#else
#define MAYBE_NoScriptPreviewsEnabledByWhitelist \
DISABLED_NoScriptPreviewsEnabledByWhitelist
#endif
IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest,
MAYBE_NoScriptPreviewsEnabledByWhitelist) {
GURL url = https_url(); GURL url = https_url();
// Whitelist NoScript for https_hint_setup_url()'s' host. // Whitelist NoScript for https_hint_setup_url()'s' host.
...@@ -438,8 +414,9 @@ IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest, ...@@ -438,8 +414,9 @@ IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest,
EXPECT_FALSE(noscript_js_requested()); EXPECT_FALSE(noscript_js_requested());
} }
IN_PROC_BROWSER_TEST_F(PreviewsNoScriptBrowserTest, IN_PROC_BROWSER_TEST_F(
NoScriptPreviewsNotEnabledByWhitelist) { PreviewsNoScriptBrowserTest,
DISABLE_ON_WIN_MAC_CHROMESOS(NoScriptPreviewsNotEnabledByWhitelist)) {
GURL url = https_url(); GURL url = https_url();
// Whitelist random site for NoScript. // Whitelist random site for NoScript.
...@@ -496,6 +473,7 @@ class PreviewsReportingBrowserTest : public CertVerifierBrowserTest { ...@@ -496,6 +473,7 @@ class PreviewsReportingBrowserTest : public CertVerifierBrowserTest {
void SetUpCommandLine(base::CommandLine* cmd) override { void SetUpCommandLine(base::CommandLine* cmd) override {
CertVerifierBrowserTest::SetUpCommandLine(cmd); CertVerifierBrowserTest::SetUpCommandLine(cmd);
cmd->AppendSwitch("enable-spdy-proxy-auth"); cmd->AppendSwitch("enable-spdy-proxy-auth");
// Due to race conditions, it's possible that blacklist data is not loaded // Due to race conditions, it's possible that blacklist data is not loaded
// at the time of first navigation. That may prevent Preview from // at the time of first navigation. That may prevent Preview from
// triggering, and causing the test to flake. // triggering, and causing the test to flake.
......
...@@ -794,14 +794,15 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation, ...@@ -794,14 +794,15 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation,
// Previews InfoBar (which these tests trigger) does not work on Mac. // Previews InfoBar (which these tests trigger) does not work on Mac.
// See https://crbug.com/782322 for detail. // See https://crbug.com/782322 for detail.
// Also occasional flakes on win7 (https://crbug.com/789542). // Also occasional flakes on win7 (https://crbug.com/789542).
#if defined(OS_WIN) || defined(OS_MACOSX) #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
#define DISABLE_ON_WIN_MAC(x) DISABLED_##x #define DISABLE_ON_WIN_MAC_CHROMESOS(x) DISABLED_##x
#else #else
#define DISABLE_ON_WIN_MAC(x) x #define DISABLE_ON_WIN_MAC_CHROMESOS(x) x
#endif #endif
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, IN_PROC_BROWSER_TEST_P(
DISABLE_ON_WIN_MAC(LitePagePreviewsTriggering)) { PreviewsLitePageServerBrowserTest,
DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsTriggering)) {
// TODO(crbug.com/874150): Use ExpectUniqueSample in these tests. // TODO(crbug.com/874150): Use ExpectUniqueSample in these tests.
// The histograms in these tests can only be checked by the expected bucket, // The histograms in these tests can only be checked by the expected bucket,
// and not by a unique sample. This is because each navigation to a preview // and not by a unique sample. This is because each navigation to a preview
...@@ -1004,8 +1005,9 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, ...@@ -1004,8 +1005,9 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
} }
} }
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, IN_PROC_BROWSER_TEST_P(
DISABLE_ON_WIN_MAC(LitePagePreviewsReloadDisabled)) { PreviewsLitePageServerBrowserTest,
DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsReloadDisabled)) {
// Start with a non-preview load. // Start with a non-preview load.
g_browser_process->network_quality_tracker() g_browser_process->network_quality_tracker()
->ReportEffectiveConnectionTypeForTesting( ->ReportEffectiveConnectionTypeForTesting(
...@@ -1024,7 +1026,7 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, ...@@ -1024,7 +1026,7 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
IN_PROC_BROWSER_TEST_P( IN_PROC_BROWSER_TEST_P(
PreviewsLitePageServerBrowserTest, PreviewsLitePageServerBrowserTest,
DISABLE_ON_WIN_MAC(ReloadingLitePagesDisablesLitePages)) { DISABLE_ON_WIN_MAC_CHROMESOS(ReloadingLitePagesDisablesLitePages)) {
base::test::ScopedFeatureList scoped_feature_list; base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitWithFeatures( scoped_feature_list.InitWithFeatures(
{previews::features::kPreviewsReloadsAreSoftOptOuts}, {}); {previews::features::kPreviewsReloadsAreSoftOptOuts}, {});
...@@ -1040,8 +1042,9 @@ IN_PROC_BROWSER_TEST_P( ...@@ -1040,8 +1042,9 @@ IN_PROC_BROWSER_TEST_P(
VerifyPreviewNotLoaded(); VerifyPreviewNotLoaded();
} }
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, IN_PROC_BROWSER_TEST_P(
DISABLE_ON_WIN_MAC(LitePagePreviewsLoadOriginal)) { PreviewsLitePageServerBrowserTest,
DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsLoadOriginal)) {
base::HistogramTester histogram_tester; base::HistogramTester histogram_tester;
ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess)); ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
VerifyPreviewLoaded(); VerifyPreviewLoaded();
...@@ -1053,7 +1056,7 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, ...@@ -1053,7 +1056,7 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
} }
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
DISABLE_ON_WIN_MAC(LitePagePreviewsRedirect)) { DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsRedirect)) {
{ {
// Verify the preview is triggered when an HTTP page redirects to HTTPS. // Verify the preview is triggered when an HTTP page redirects to HTTPS.
base::HistogramTester histogram_tester; base::HistogramTester histogram_tester;
...@@ -1107,7 +1110,7 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, ...@@ -1107,7 +1110,7 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
} }
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
DISABLE_ON_WIN_MAC(LitePagePreviewsResponse)) { DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsResponse)) {
{ {
// Verify the preview is not triggered when the server responds with bypass // Verify the preview is not triggered when the server responds with bypass
// 307. // 307.
...@@ -1187,7 +1190,7 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, ...@@ -1187,7 +1190,7 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
} }
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
DISABLE_ON_WIN_MAC(LitePagePreviewsLoadshed)) { DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsLoadshed)) {
PreviewsService* previews_service = PreviewsService* previews_service =
PreviewsServiceFactory::GetForProfile(browser()->profile()); PreviewsServiceFactory::GetForProfile(browser()->profile());
ASSERT_TRUE(previews_service); ASSERT_TRUE(previews_service);
...@@ -1231,8 +1234,9 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, ...@@ -1231,8 +1234,9 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
VerifyPreviewLoaded(); VerifyPreviewLoaded();
} }
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, IN_PROC_BROWSER_TEST_P(
DISABLE_ON_WIN_MAC(LitePageURLNotReportedToHistory)) { PreviewsLitePageServerBrowserTest,
DISABLE_ON_WIN_MAC_CHROMESOS(LitePageURLNotReportedToHistory)) {
base::CancelableTaskTracker tracker_; base::CancelableTaskTracker tracker_;
history::HistoryService* history_service = history::HistoryService* history_service =
HistoryServiceFactory::GetForProfile(browser()->profile(), HistoryServiceFactory::GetForProfile(browser()->profile(),
...@@ -1291,8 +1295,9 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, ...@@ -1291,8 +1295,9 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
ClearDeciderState(); ClearDeciderState();
} }
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, IN_PROC_BROWSER_TEST_P(
DISABLE_ON_WIN_MAC(LitePagePreviewsReportSavings)) { PreviewsLitePageServerBrowserTest,
DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsReportSavings)) {
PrefService* prefs = browser()->profile()->GetPrefs(); PrefService* prefs = browser()->profile()->GetPrefs();
prefs->SetBoolean(data_reduction_proxy::prefs::kDataUsageReportingEnabled, prefs->SetBoolean(data_reduction_proxy::prefs::kDataUsageReportingEnabled,
true); true);
...@@ -1313,8 +1318,9 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, ...@@ -1313,8 +1318,9 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
EXPECT_EQ(GetTotalOriginalContentLength() - GetTotalDataUsage(), 40U); EXPECT_EQ(GetTotalOriginalContentLength() - GetTotalDataUsage(), 40U);
} }
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, IN_PROC_BROWSER_TEST_P(
DISABLE_ON_WIN_MAC(LitePagePreviewsClientRedirect)) { PreviewsLitePageServerBrowserTest,
DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsClientRedirect)) {
// Navigate to a non-preview first. // Navigate to a non-preview first.
ui_test_utils::NavigateToURL(browser(), https_media_url()); ui_test_utils::NavigateToURL(browser(), https_media_url());
VerifyPreviewNotLoaded(); VerifyPreviewNotLoaded();
...@@ -1327,8 +1333,9 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, ...@@ -1327,8 +1333,9 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
https_media_url()); https_media_url());
} }
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, IN_PROC_BROWSER_TEST_P(
DISABLE_ON_WIN_MAC(LitePagePreviewsNavigation)) { PreviewsLitePageServerBrowserTest,
DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsNavigation)) {
ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess)); ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
VerifyPreviewLoaded(); VerifyPreviewLoaded();
...@@ -1355,7 +1362,7 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, ...@@ -1355,7 +1362,7 @@ IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
} }
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest, IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBrowserTest,
DISABLE_ON_WIN_MAC(LitePageCreatesPingback)) { DISABLE_ON_WIN_MAC_CHROMESOS(LitePageCreatesPingback)) {
ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess)); ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
VerifyPreviewLoaded(); VerifyPreviewLoaded();
...@@ -1384,7 +1391,7 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation, ...@@ -1384,7 +1391,7 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation,
testing::Bool()); testing::Bool());
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerTimeoutBrowserTest, IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerTimeoutBrowserTest,
DISABLE_ON_WIN_MAC(LitePagePreviewsTimeout)) { DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsTimeout)) {
{ {
// Ensure that a hung previews navigation doesn't wind up at the previews // Ensure that a hung previews navigation doesn't wind up at the previews
// server. // server.
...@@ -1429,8 +1436,9 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation, ...@@ -1429,8 +1436,9 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation,
PreviewsLitePageServerBadServerBrowserTest, PreviewsLitePageServerBadServerBrowserTest,
testing::Bool()); testing::Bool());
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerBadServerBrowserTest, IN_PROC_BROWSER_TEST_P(
DISABLE_ON_WIN_MAC(LitePagePreviewsBadServer)) { PreviewsLitePageServerBadServerBrowserTest,
DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsBadServer)) {
// TODO(crbug.com/874150): Use ExpectUniqueSample in this tests. // TODO(crbug.com/874150): Use ExpectUniqueSample in this tests.
// The histograms in this tests can only be checked by the expected bucket, // The histograms in this tests can only be checked by the expected bucket,
// and not by a unique sample. This is because each navigation to a preview // and not by a unique sample. This is because each navigation to a preview
...@@ -1475,8 +1483,9 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation, ...@@ -1475,8 +1483,9 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation,
PreviewsLitePageServerDataSaverBrowserTest, PreviewsLitePageServerDataSaverBrowserTest,
testing::Bool()); testing::Bool());
IN_PROC_BROWSER_TEST_P(PreviewsLitePageServerDataSaverBrowserTest, IN_PROC_BROWSER_TEST_P(
DISABLE_ON_WIN_MAC(LitePagePreviewsDSTriggering)) { PreviewsLitePageServerDataSaverBrowserTest,
DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsDSTriggering)) {
// Verify the preview is not triggered on HTTPS pageloads without DataSaver. // Verify the preview is not triggered on HTTPS pageloads without DataSaver.
ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess)); ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
VerifyPreviewNotLoaded(); VerifyPreviewNotLoaded();
...@@ -1510,7 +1519,7 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation, ...@@ -1510,7 +1519,7 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation,
IN_PROC_BROWSER_TEST_P( IN_PROC_BROWSER_TEST_P(
PreviewsLitePageServerNoDataSaverHeaderBrowserTest, PreviewsLitePageServerNoDataSaverHeaderBrowserTest,
DISABLE_ON_WIN_MAC(LitePagePreviewsDSNoHeaderTriggering)) { DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsDSNoHeaderTriggering)) {
// Verify the preview is not triggered on HTTPS pageloads without data saver. // Verify the preview is not triggered on HTTPS pageloads without data saver.
ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess)); ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
VerifyPreviewNotLoaded(); VerifyPreviewNotLoaded();
...@@ -1546,7 +1555,7 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation, ...@@ -1546,7 +1555,7 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation,
IN_PROC_BROWSER_TEST_P( IN_PROC_BROWSER_TEST_P(
PreviewsLitePageNotificationDSEnabledBrowserTest, PreviewsLitePageNotificationDSEnabledBrowserTest,
DISABLE_ON_WIN_MAC(LitePagePreviewsInfoBarDataSaverUser)) { DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsInfoBarDataSaverUser)) {
// Ensure the preview is not shown the first time before the infobar is shown // Ensure the preview is not shown the first time before the infobar is shown
// for users who have DRP enabled. // for users who have DRP enabled.
base::HistogramTester histogram_tester; base::HistogramTester histogram_tester;
...@@ -1613,7 +1622,7 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation, ...@@ -1613,7 +1622,7 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation,
IN_PROC_BROWSER_TEST_P( IN_PROC_BROWSER_TEST_P(
PreviewsLitePageNotificationDSDisabledBrowserTest, PreviewsLitePageNotificationDSDisabledBrowserTest,
DISABLE_ON_WIN_MAC(LitePagePreviewsInfoBarNonDataSaverUser)) { DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsInfoBarNonDataSaverUser)) {
ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess)); ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
VerifyPreviewNotLoaded(); VerifyPreviewNotLoaded();
ClearDeciderState(); ClearDeciderState();
...@@ -1639,8 +1648,9 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation, ...@@ -1639,8 +1648,9 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation,
PreviewsLitePageControlBrowserTest, PreviewsLitePageControlBrowserTest,
testing::Bool()); testing::Bool());
IN_PROC_BROWSER_TEST_P(PreviewsLitePageControlBrowserTest, IN_PROC_BROWSER_TEST_P(
DISABLE_ON_WIN_MAC(LitePagePreviewsControlGroup)) { PreviewsLitePageControlBrowserTest,
DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsControlGroup)) {
base::HistogramTester histogram_tester; base::HistogramTester histogram_tester;
ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess)); ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
VerifyPreviewNotLoaded(); VerifyPreviewNotLoaded();
...@@ -1690,6 +1700,7 @@ class PreviewsLitePageAndPageHintsBrowserTest ...@@ -1690,6 +1700,7 @@ class PreviewsLitePageAndPageHintsBrowserTest
void SetUpCommandLine(base::CommandLine* cmd) override { void SetUpCommandLine(base::CommandLine* cmd) override {
PreviewsLitePageServerBrowserTest::SetUpCommandLine(cmd); PreviewsLitePageServerBrowserTest::SetUpCommandLine(cmd);
cmd->AppendSwitch("optimization-guide-disable-installer"); cmd->AppendSwitch("optimization-guide-disable-installer");
cmd->AppendSwitch("purge_hint_cache_store");
} }
private: private:
...@@ -1705,7 +1716,7 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation, ...@@ -1705,7 +1716,7 @@ INSTANTIATE_TEST_SUITE_P(URLLoaderImplementation,
IN_PROC_BROWSER_TEST_P( IN_PROC_BROWSER_TEST_P(
PreviewsLitePageAndPageHintsBrowserTest, PreviewsLitePageAndPageHintsBrowserTest,
DISABLE_ON_WIN_MAC(LitePagePreviewsDoesNotOverridePageHints)) { DISABLE_ON_WIN_MAC_CHROMESOS(LitePagePreviewsDoesNotOverridePageHints)) {
base::HistogramTester histogram_tester; base::HistogramTester histogram_tester;
// Whitelist test URL for resource loading hints. // Whitelist test URL for resource loading hints.
......
...@@ -126,6 +126,9 @@ class ResourceLoadingNoFeaturesBrowserTest : public InProcessBrowserTest { ...@@ -126,6 +126,9 @@ class ResourceLoadingNoFeaturesBrowserTest : public InProcessBrowserTest {
void SetUpCommandLine(base::CommandLine* cmd) override { void SetUpCommandLine(base::CommandLine* cmd) override {
cmd->AppendSwitch("enable-spdy-proxy-auth"); cmd->AppendSwitch("enable-spdy-proxy-auth");
cmd->AppendSwitch("optimization-guide-disable-installer");
cmd->AppendSwitch("purge_hint_cache_store");
// Due to race conditions, it's possible that blacklist data is not loaded // Due to race conditions, it's possible that blacklist data is not loaded
// at the time of first navigation. That may prevent Preview from // at the time of first navigation. That may prevent Preview from
// triggering, and causing the test to flake. // triggering, and causing the test to flake.
...@@ -349,15 +352,15 @@ class ResourceLoadingHintsBrowserTest ...@@ -349,15 +352,15 @@ class ResourceLoadingHintsBrowserTest
// Previews InfoBar (which these tests triggers) does not work on Mac. // Previews InfoBar (which these tests triggers) does not work on Mac.
// See https://crbug.com/782322 for details. Also occasional flakes on win7 // See https://crbug.com/782322 for details. Also occasional flakes on win7
// (https://crbug.com/789542). // (https://crbug.com/789542).
#if defined(OS_WIN) || defined(OS_MACOSX) #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
#define DISABLE_ON_WIN_MAC(x) DISABLED_##x #define DISABLE_ON_WIN_MAC_CHROMESOS(x) DISABLED_##x
#else #else
#define DISABLE_ON_WIN_MAC(x) x #define DISABLE_ON_WIN_MAC_CHROMESOS(x) x
#endif #endif
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
ResourceLoadingHintsBrowserTest, ResourceLoadingHintsBrowserTest,
DISABLE_ON_WIN_MAC(ResourceLoadingHintsHttpsWhitelisted)) { DISABLE_ON_WIN_MAC_CHROMESOS(ResourceLoadingHintsHttpsWhitelisted)) {
GURL url = https_url(); GURL url = https_url();
// Whitelist resource loading hints for https_hint_setup_url()'s' host. // Whitelist resource loading hints for https_hint_setup_url()'s' host.
...@@ -419,7 +422,7 @@ IN_PROC_BROWSER_TEST_F( ...@@ -419,7 +422,7 @@ IN_PROC_BROWSER_TEST_F(
// not blocked. // not blocked.
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
ResourceLoadingHintsBrowserTest, ResourceLoadingHintsBrowserTest,
DISABLE_ON_WIN_MAC(ExperimentalHints_ExperimentIsNotEnabled)) { DISABLE_ON_WIN_MAC_CHROMESOS(ExperimentalHints_ExperimentIsNotEnabled)) {
GURL url = https_url(); GURL url = https_url();
// Whitelist resource loading hints for https_hint_setup_url()'s' host. // Whitelist resource loading hints for https_hint_setup_url()'s' host.
...@@ -447,7 +450,7 @@ IN_PROC_BROWSER_TEST_F( ...@@ -447,7 +450,7 @@ IN_PROC_BROWSER_TEST_F(
// Verifies that the hints are used, and the resource loading is blocked. // Verifies that the hints are used, and the resource loading is blocked.
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
ResourceLoadingHintsBrowserTest, ResourceLoadingHintsBrowserTest,
DISABLE_ON_WIN_MAC(ExperimentalHints_ExperimentIsEnabled)) { DISABLE_ON_WIN_MAC_CHROMESOS(ExperimentalHints_ExperimentIsEnabled)) {
base::test::ScopedFeatureList scoped_list; base::test::ScopedFeatureList scoped_list;
scoped_list.InitAndEnableFeatureWithParameters( scoped_list.InitAndEnableFeatureWithParameters(
previews::features::kOptimizationHintsExperiments, previews::features::kOptimizationHintsExperiments,
...@@ -490,7 +493,7 @@ IN_PROC_BROWSER_TEST_F( ...@@ -490,7 +493,7 @@ IN_PROC_BROWSER_TEST_F(
// blocked. // blocked.
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
ResourceLoadingHintsBrowserTest, ResourceLoadingHintsBrowserTest,
DISABLE_ON_WIN_MAC(MixExperimentalHints_ExperimentIsEnabled)) { DISABLE_ON_WIN_MAC_CHROMESOS(MixExperimentalHints_ExperimentIsEnabled)) {
base::test::ScopedFeatureList scoped_list; base::test::ScopedFeatureList scoped_list;
scoped_list.InitAndEnableFeatureWithParameters( scoped_list.InitAndEnableFeatureWithParameters(
previews::features::kOptimizationHintsExperiments, previews::features::kOptimizationHintsExperiments,
...@@ -534,7 +537,7 @@ IN_PROC_BROWSER_TEST_F( ...@@ -534,7 +537,7 @@ IN_PROC_BROWSER_TEST_F(
// used. // used.
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
ResourceLoadingHintsBrowserTest, ResourceLoadingHintsBrowserTest,
DISABLE_ON_WIN_MAC(MixExperimentalHints_ExperimentIsNotEnabled)) { DISABLE_ON_WIN_MAC_CHROMESOS(MixExperimentalHints_ExperimentIsNotEnabled)) {
base::test::ScopedFeatureList scoped_list; base::test::ScopedFeatureList scoped_list;
scoped_list.InitAndEnableFeatureWithParameters( scoped_list.InitAndEnableFeatureWithParameters(
previews::features::kOptimizationHintsExperiments, previews::features::kOptimizationHintsExperiments,
...@@ -569,7 +572,8 @@ IN_PROC_BROWSER_TEST_F( ...@@ -569,7 +572,8 @@ IN_PROC_BROWSER_TEST_F(
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
ResourceLoadingHintsBrowserTest, ResourceLoadingHintsBrowserTest,
DISABLE_ON_WIN_MAC(ResourceLoadingHintsHttpsWhitelistedRedirectToHttps)) { DISABLE_ON_WIN_MAC_CHROMESOS(
ResourceLoadingHintsHttpsWhitelistedRedirectToHttps)) {
GURL url = redirect_url(); GURL url = redirect_url();
// Whitelist resource loading hints for https_hint_setup_url()'s' host. // Whitelist resource loading hints for https_hint_setup_url()'s' host.
...@@ -604,7 +608,7 @@ IN_PROC_BROWSER_TEST_F( ...@@ -604,7 +608,7 @@ IN_PROC_BROWSER_TEST_F(
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
ResourceLoadingHintsBrowserTest, ResourceLoadingHintsBrowserTest,
DISABLE_ON_WIN_MAC(ResourceLoadingHintsHttpsNoWhitelisted)) { DISABLE_ON_WIN_MAC_CHROMESOS(ResourceLoadingHintsHttpsNoWhitelisted)) {
GURL url = https_url(); GURL url = https_url();
SetExpectedFooJpgRequest(true); SetExpectedFooJpgRequest(true);
...@@ -630,7 +634,7 @@ IN_PROC_BROWSER_TEST_F( ...@@ -630,7 +634,7 @@ IN_PROC_BROWSER_TEST_F(
} }
IN_PROC_BROWSER_TEST_F(ResourceLoadingHintsBrowserTest, IN_PROC_BROWSER_TEST_F(ResourceLoadingHintsBrowserTest,
DISABLE_ON_WIN_MAC(ResourceLoadingHintsHttp)) { DISABLE_ON_WIN_MAC_CHROMESOS(ResourceLoadingHintsHttp)) {
GURL url = http_url(); GURL url = http_url();
// Whitelist resource loading hints for http_hint_setup_url()'s' host. // Whitelist resource loading hints for http_hint_setup_url()'s' host.
...@@ -655,9 +659,9 @@ IN_PROC_BROWSER_TEST_F(ResourceLoadingHintsBrowserTest, ...@@ -655,9 +659,9 @@ IN_PROC_BROWSER_TEST_F(ResourceLoadingHintsBrowserTest,
EXPECT_FALSE(resource_loading_hint_intervention_header_seen()); EXPECT_FALSE(resource_loading_hint_intervention_header_seen());
} }
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(ResourceLoadingHintsBrowserTest,
ResourceLoadingHintsBrowserTest, DISABLE_ON_WIN_MAC_CHROMESOS(
DISABLE_ON_WIN_MAC(ResourceLoadingHintsHttpsWhitelistedNoTransform)) { ResourceLoadingHintsHttpsWhitelistedNoTransform)) {
GURL url = https_no_transform_url(); GURL url = https_no_transform_url();
// Whitelist resource loading hints for http_hint_setup_url()'s' host. // Whitelist resource loading hints for http_hint_setup_url()'s' host.
......
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