Commit 3948c66f authored by Mark Pearson's avatar Mark Pearson Committed by Chromium LUCI CQ

Revert "Reenable PredictionManager and HintsFetcher browser tests that were"

This reverts commit 3bd04812.

Reason for revert:
causes failures on
Win 7 Tests x64 (1)
Win7 Tests (dbg)(1)
Win7 (32) Tests

Example bot that failed:
https://ci.chromium.org/ui/p/chromium/builders/ci/Win%207%20Tests%20x64%20(1)/76517/overview

Top of failure message (it's long so I didn't paste the whole thing here):
[ RUN      ] PredictionManagerModelDownloadingBrowserTest.TestSuccessfulModelFileFlow
../../content/public/test/browser_test_base.cc(756): error: Failed
RunLoop::Run() timed out.
Stack trace:
Backtrace:
	base::internal::Invoker<base::internal::BindState<`lambda at ../../base/test/scoped_run_loop_timeout.cc:49:9',base::Location,base::RepeatingCallback<std::basic_string<char> ()> >,void ()>::Run [0x0000000143A46C1D+157] (o:\base\bind_internal.h:692)
	base::`anonymous namespace'::OnRunLoopTimeout [0x00000001439B533E+46] (o:\base\run_loop.cc:44)
	base::internal::Invoker<base::internal::BindState<void (*)(base::RunLoop *, base::OnceCallback<void ()>),base::internal::UnretainedWrapper<base::RunLoop>,base::RepeatingCallback<void ()> >,void ()>::RunOnce [0x00000001439B6726+86] (o:\base\bind_internal.h:679)
	base::internal::CancelableCallbackImpl<base::OnceCallback<void ()> >::ForwardOnce<> [0x0000000141157DE6+54] (o:\base\cancelable_callback.h:128)
	base::TaskAnnotator::RunTask [0x00000001439CD3DD+365] (o:\base\task\common\task_annotator.cc:163)
	base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl [0x0000000144EE8481+433] (o:\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:352)
	base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork [0x0000000144EE814C+204] (o:\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:266)
	base::MessagePumpForUI::DoRunLoop [0x0000000143A011BA+122] (o:\base\message_loop\message_pump_win.cc:225)
	base::MessagePumpWin::Run [0x0000000143A008DA+90] (o:\base\message_loop\message_pump_win.cc:82)
	base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run [0x0000000144EE8DF1+273] (o:\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:463)
	base::RunLoop::Run [0x00000001439B4DE1+433] (o:\base\run_loop.cc:133)
	optimization_guide::PredictionManagerModelDownloadingBrowserTest_TestSuccessfulModelFileFlow_Test::RunTestOnMainThread [0x000000013FDFF540+288] (o:\chrome\browser\optimization_guide\prediction\prediction_manager_browsertest.cc:1045)
	content::BrowserTestBase::ProxyRunTestOnMainThreadLoop [0x0000000143C2BCB3+419] (o:\content\public\test\browser_test_base.cc:807)
	ChromeBrowserMainParts::PreMainMessageLoopRunImpl [0x0000000143A784EE+4582] (o:\chrome\browser\chrome_browser_main.cc:1688)
	ChromeBrowserMainParts::PreMainMessageLoopRun [0x0000000143A77241+65] (o:\chrome\browser\chrome_browser_main.cc:1044)
	content::BrowserMainLoop::PreMainMessageLoopRun [0x0000000141F3DFB9+73] (o:\content\browser\browser_main_loop.cc:946)
	content::StartupTaskRunner::RunAllTasksNow [0x00000001422F62C7+61] (o:\content\browser\startup_task_runner.cc:41)
	content::BrowserMainLoop::CreateStartupTasks [0x0000000141F3CD05+621] (o:\content\browser\browser_main_loop.cc:860)
	content::BrowserMainRunnerImpl::Initialize [0x0000000141F3FA1E+126] (o:\content\browser\browser_main_runner_impl.cc:130)
	content::BrowserMain [0x0000000141F3B579+161] (o:\content\browser\browser_main.cc:43)
	content::RunBrowserProcessMain [0x00000001428DCA39+169] (o:\content\app\content_main_runner_impl.cc:555)
	content::ContentMainRunnerImpl::RunBrowser [0x00000001428DD7F2+854] (o:\content\app\content_main_runner_impl.cc:1059)
	content::ContentMainRunnerImpl::Run [0x00000001428DD46F+335] (o:\content\app\content_main_runner_impl.cc:929)
	content::RunContentProcess [0x00000001428DC2D1+805] (o:\content\app\content_main.cc:372)
	content::ContentMain [0x00000001428DC64E+61] (o:\content\app\content_main.cc:398)
	content::BrowserTestBase::SetUp [0x0000000143C2B516+1894] (o:\content\public\test\browser_test_base.cc:683)
	InProcessBrowserTest::SetUp [0x00000001439630CE+398] (o:\chrome\test\base\in_process_browser_test.cc:351)
	optimization_guide::PredictionManagerBrowserTestBase::SetUp [0x000000013FDFF76A+266] (o:\chrome\browser\optimization_guide\prediction\prediction_manager_browsertest.cc:256)

../../base/test/metrics/histogram_tester.cc(43): error: Expected equality of these values:
  0
  expected_count
    Which is: 1
Zero samples found for Histogram "OptimizationGuide.PredictionModelDownloadManager.DownloadStatus".


Original change's description:
> Reenable PredictionManager and HintsFetcher browser tests that were
> disabled on desktop platforms
>
> Change-Id: I173ac1025760f908042e64c7c8839fb90e41fc78
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2626918
> Reviewed-by: Michael Crouse <mcrouse@chromium.org>
> Commit-Queue: Sophie Chang <sophiechang@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#843180}

TBR=sophiechang@chromium.org,mcrouse@chromium.org,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Ia5e026dcfd3a0b0ccfb68c2baad18209222a02b4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2628258Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Commit-Queue: Mark Pearson <mpearson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843220}
parent 62591398
......@@ -549,13 +549,22 @@ class HintsFetcherBrowserTest : public HintsFetcherDisabledBrowserTest {
DISALLOW_COPY_AND_ASSIGN(HintsFetcherBrowserTest);
};
// Issues with multiple profiles likely cause the site engagement service-based
// tests to flake.
#if defined(OS_WIN) || defined(OS_MAC) || BUILDFLAG(IS_CHROMEOS_ASH)
#define DISABLE_ON_WIN_MAC_CHROMEOS(x) DISABLED_##x
#else
#define DISABLE_ON_WIN_MAC_CHROMEOS(x) x
#endif
// This test creates new browser with no profile and loads a random page with
// the feature flags for OptimizationHintsFetching. We confirm that the
// TopHostProvider is called and does not crash by checking UMA
// histograms for the total number of TopEngagementSites and
// the total number of sites returned controlled by the experiments flag
// |max_oneplatform_update_hosts|.
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest, HintsFetcherEnabled) {
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
DISABLE_ON_WIN_MAC_CHROMEOS(HintsFetcherEnabled)) {
const base::HistogramTester* histogram_tester = GetHistogramTester();
// Whitelist NoScript for https_url()'s' host.
......@@ -596,7 +605,8 @@ IN_PROC_BROWSER_TEST_F(HintsFetcherDisabledBrowserTest, HintsFetcherDisabled) {
// is called to provide a list of hosts to HintsFetcher only returns hosts with
// a HTTPS scheme. We verify this with the UMA histogram logged when the
// GetHintsRequest is made to the remote Optimization Guide Service.
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest, TopHostProviderHTTPSOnly) {
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
DISABLE_ON_WIN_MAC_CHROMEOS(TopHostProviderHTTPSOnly)) {
const base::HistogramTester* histogram_tester = GetHistogramTester();
// Adds two HTTP and two HTTPS sites into the Site Engagement Service.
......@@ -622,8 +632,9 @@ IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest, TopHostProviderHTTPSOnly) {
EXPECT_EQ(0u, GetTopHostBlacklistSize());
}
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
HintsFetcherFetchedHintsLoaded) {
IN_PROC_BROWSER_TEST_F(
HintsFetcherBrowserTest,
DISABLE_ON_WIN_MAC_CHROMEOS(HintsFetcherFetchedHintsLoaded)) {
const base::HistogramTester* histogram_tester = GetHistogramTester();
GURL url = https_url();
......@@ -656,8 +667,9 @@ IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
"OptimizationGuide.HintCache.HintType.Loaded", 0);
}
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
HintsFetcherWithResponsesSuccessful) {
IN_PROC_BROWSER_TEST_F(
HintsFetcherBrowserTest,
DISABLE_ON_WIN_MAC_CHROMEOS(HintsFetcherWithResponsesSuccessful)) {
SetResponseType(HintsFetcherRemoteResponseType::kSuccessful);
const base::HistogramTester* histogram_tester = GetHistogramTester();
......@@ -687,8 +699,9 @@ IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
"OptimizationGuide.HintsFetcher.GetHintsRequest.HintCount", 1, 1);
}
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
HintsFetcherWithResponsesUnsuccessful) {
IN_PROC_BROWSER_TEST_F(
HintsFetcherBrowserTest,
DISABLE_ON_WIN_MAC_CHROMEOS(HintsFetcherWithResponsesUnsuccessful)) {
SetResponseType(HintsFetcherRemoteResponseType::kUnsuccessful);
const base::HistogramTester* histogram_tester = GetHistogramTester();
......@@ -717,8 +730,9 @@ IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
"OptimizationGuide.HintsFetcher.GetHintsRequest.HintCount", 0);
}
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
HintsFetcherWithResponsesMalformed) {
IN_PROC_BROWSER_TEST_F(
HintsFetcherBrowserTest,
DISABLE_ON_WIN_MAC_CHROMEOS(HintsFetcherWithResponsesMalformed)) {
SetResponseType(HintsFetcherRemoteResponseType::kMalformed);
const base::HistogramTester* histogram_tester = GetHistogramTester();
......@@ -749,8 +763,10 @@ IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
"OptimizationGuide.HintsFetcher.GetHintsRequest.HintCount", 0);
}
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
HintsFetcherWithResponsesUnsuccessfulAtNavigationTime) {
IN_PROC_BROWSER_TEST_F(
HintsFetcherBrowserTest,
DISABLE_ON_WIN_MAC_CHROMEOS(
HintsFetcherWithResponsesUnsuccessfulAtNavigationTime)) {
const base::HistogramTester* histogram_tester = GetHistogramTester();
SetResponseType(HintsFetcherRemoteResponseType::kUnsuccessful);
......@@ -771,7 +787,8 @@ IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
IN_PROC_BROWSER_TEST_F(
HintsFetcherBrowserTest,
HintsFetcherWithResponsesHungShouldRecordWhenActiveRequestCanceled) {
DISABLE_ON_WIN_MAC_CHROMEOS(
HintsFetcherWithResponsesHungShouldRecordWhenActiveRequestCanceled)) {
const base::HistogramTester* histogram_tester = GetHistogramTester();
SetResponseType(HintsFetcherRemoteResponseType::kHung);
......@@ -792,7 +809,9 @@ IN_PROC_BROWSER_TEST_F(
1, 1);
}
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest, HintsFetcherClearFetchedHints) {
IN_PROC_BROWSER_TEST_F(
HintsFetcherBrowserTest,
DISABLE_ON_WIN_MAC_CHROMEOS(HintsFetcherClearFetchedHints)) {
const base::HistogramTester* histogram_tester = GetHistogramTester();
GURL url = https_url();
......@@ -839,7 +858,8 @@ IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest, HintsFetcherClearFetchedHints) {
1);
}
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest, HintsFetcherOverrideTimer) {
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
DISABLE_ON_WIN_MAC_CHROMEOS(HintsFetcherOverrideTimer)) {
const base::HistogramTester* histogram_tester = GetHistogramTester();
GURL url = https_url();
base::CommandLine::ForCurrentProcess()->RemoveSwitch(
......@@ -885,7 +905,9 @@ IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest, HintsFetcherOverrideTimer) {
"OptimizationGuide.HintCache.HintType.Loaded", 0);
}
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest, HintsFetcherNetworkOffline) {
IN_PROC_BROWSER_TEST_F(
HintsFetcherBrowserTest,
DISABLE_ON_WIN_MAC_CHROMEOS(HintsFetcherNetworkOffline)) {
const base::HistogramTester* histogram_tester = GetHistogramTester();
GURL url = https_url();
base::CommandLine::ForCurrentProcess()->RemoveSwitch(
......@@ -914,7 +936,8 @@ IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest, HintsFetcherNetworkOffline) {
"OptimizationGuide.HintsFetcher.GetHintsRequest.HostCount", 0);
}
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest, HintsFetcherFetches) {
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
DISABLE_ON_WIN_MAC_CHROMEOS(HintsFetcherFetches)) {
const base::HistogramTester* histogram_tester = GetHistogramTester();
// Whitelist NoScript for https_url()'s' host.
......@@ -943,8 +966,9 @@ IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest, HintsFetcherFetches) {
}
// Test that the hints are fetched at the time of the navigation.
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
HintsFetcher_NavigationFetch_ECT) {
IN_PROC_BROWSER_TEST_F(
HintsFetcherBrowserTest,
DISABLE_ON_WIN_MAC_CHROMEOS(HintsFetcher_NavigationFetch_ECT)) {
{
base::HistogramTester histogram_tester;
......@@ -1171,7 +1195,8 @@ IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
// Test that the hints are fetched at the time of the navigation.
IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
HintsFetcher_NavigationFetch_URLKeyedNotRefetched) {
DISABLE_ON_WIN_MAC_CHROMEOS(
HintsFetcher_NavigationFetch_URLKeyedNotRefetched)) {
const base::HistogramTester* histogram_tester = GetHistogramTester();
// Whitelist NoScript for https_url()'s' host.
......@@ -1277,7 +1302,8 @@ IN_PROC_BROWSER_TEST_F(HintsFetcherBrowserTest,
// Test that the hints are fetched at the time of the navigation.
IN_PROC_BROWSER_TEST_F(
HintsFetcherBrowserTest,
HintsFetcher_NavigationFetch_FetchWithNewlyRegisteredOptType) {
DISABLE_ON_WIN_MAC_CHROMEOS(
HintsFetcher_NavigationFetch_FetchWithNewlyRegisteredOptType)) {
const base::HistogramTester* histogram_tester = GetHistogramTester();
// Whitelist NoScript for https_url()'s' host.
......@@ -1370,7 +1396,8 @@ IN_PROC_BROWSER_TEST_F(
// Test that the hints are fetched at the time of the navigation.
IN_PROC_BROWSER_TEST_F(
HintsFetcherBrowserTest,
HintsFetcher_NavigationFetch_CacheNotClearedOnLaunchedOptTypes) {
DISABLE_ON_WIN_MAC_CHROMEOS(
HintsFetcher_NavigationFetch_CacheNotClearedOnLaunchedOptTypes)) {
const base::HistogramTester* histogram_tester = GetHistogramTester();
// Whitelist NoScript for https_url()'s' host.
......@@ -1545,8 +1572,9 @@ class HintsFetcherSearchPageBrowserTest : public HintsFetcherBrowserTest {
}
};
IN_PROC_BROWSER_TEST_F(HintsFetcherSearchPageBrowserTest,
HintsFetcher_SRP_Slow_Connection) {
IN_PROC_BROWSER_TEST_F(
HintsFetcherSearchPageBrowserTest,
DISABLE_ON_WIN_MAC_CHROMEOS(HintsFetcher_SRP_Slow_Connection)) {
g_browser_process->network_quality_tracker()
->ReportEffectiveConnectionTypeForTesting(
net::EFFECTIVE_CONNECTION_TYPE_2G);
......
......@@ -608,6 +608,13 @@ class PredictionManagerTest : public ProtoDatabaseProviderTestBase {
std::unique_ptr<content::TestWebContentsFactory> web_contents_factory_;
};
// No support for Mac, Windows or ChromeOS.
#if defined(OS_WIN) || defined(OS_MAC) || BUILDFLAG(IS_CHROMEOS_ASH)
#define DISABLE_ON_WIN_MAC_CHROMEOS(x) DISABLED_##x
#else
#define DISABLE_ON_WIN_MAC_CHROMEOS(x) x
#endif
TEST_F(PredictionManagerTest, RemoteFetchingDisabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndDisableFeature(
......@@ -815,7 +822,8 @@ TEST_F(PredictionManagerTest,
}
TEST_F(PredictionManagerTest,
NoPredictionModelForRegisteredOptimizationTarget) {
DISABLE_ON_WIN_MAC_CHROMEOS(
NoPredictionModelForRegisteredOptimizationTarget)) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(features::kRemoteOptimizationGuideFetching);
......@@ -1419,7 +1427,8 @@ TEST_F(PredictionManagerTest,
}
TEST_F(PredictionManagerTest,
ShouldTargetNavigationStoreUnavailableModelUnknown) {
DISABLE_ON_WIN_MAC_CHROMEOS(
ShouldTargetNavigationStoreUnavailableModelUnknown)) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(features::kRemoteOptimizationGuideFetching);
......@@ -1561,7 +1570,9 @@ TEST_F(PredictionManagerTest, UpdateModelForRegisteredTargetButNowFile) {
proto::OPTIMIZATION_TARGET_PAINFUL_PAGE_LOAD, {}));
}
TEST_F(PredictionManagerTest, UpdateModelWithUnsupportedOptimizationTarget) {
TEST_F(
PredictionManagerTest,
DISABLE_ON_WIN_MAC_CHROMEOS(UpdateModelWithUnsupportedOptimizationTarget)) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(features::kRemoteOptimizationGuideFetching);
......@@ -1588,16 +1599,16 @@ TEST_F(PredictionManagerTest, UpdateModelWithUnsupportedOptimizationTarget) {
prediction_manager()->UpdatePredictionModelsForTesting(
get_models_response.get());
EXPECT_EQ(OptimizationTargetDecision::kModelNotAvailableOnClient,
prediction_manager()->ShouldTargetNavigation(
navigation_handle.get(),
proto::OPTIMIZATION_TARGET_PAINFUL_PAGE_LOAD, {}));
EXPECT_EQ(OptimizationTargetDecision::kModelNotAvailableOnClient,
prediction_manager()->ShouldTargetNavigation(
navigation_handle.get(),
proto::OPTIMIZATION_TARGET_PAINFUL_PAGE_LOAD, {}));
TestPredictionModel* test_prediction_model =
static_cast<TestPredictionModel*>(
prediction_manager()->GetPredictionModelForTesting(
proto::OPTIMIZATION_TARGET_PAINFUL_PAGE_LOAD));
EXPECT_FALSE(test_prediction_model);
TestPredictionModel* test_prediction_model =
static_cast<TestPredictionModel*>(
prediction_manager()->GetPredictionModelForTesting(
proto::OPTIMIZATION_TARGET_PAINFUL_PAGE_LOAD));
EXPECT_FALSE(test_prediction_model);
EXPECT_FALSE(models_and_features_store()->WasModelLoaded());
}
......
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