Commit bc7dc30e authored by Doug Arnett's avatar Doug Arnett Committed by Commit Bot

Fixes flake timeout for DeferAllScriptRestoredPreviewWithBackForwardCache

Replaces waiting on a histogram recording to know when a navigation is
complete with a content::WaitForLoadStop(). This seems to address the
flakey timeout I was reproducing locally.

Bug: 1032558, 1035377
Change-Id: I2a6e032ea6b112988699ea06275bbd28ec261362
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1974431
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726164}
parent 2c1e9a4a
...@@ -534,9 +534,7 @@ IN_PROC_BROWSER_TEST_F(DeferAllScriptBrowserTest, ...@@ -534,9 +534,7 @@ IN_PROC_BROWSER_TEST_F(DeferAllScriptBrowserTest,
ukm::TestAutoSetUkmRecorder test_ukm_recorder; ukm::TestAutoSetUkmRecorder test_ukm_recorder;
// Wait for initial page load to complete. // Wait for initial page load to complete.
RetryForHistogramUntilCountReached( content::WaitForLoadStop(web_contents());
&histogram_tester, "PageLoad.DocumentTiming.NavigationToLoadEventFired",
1);
// Navigate to DeferAllScript url expecting a DeferAllScript preview. // Navigate to DeferAllScript url expecting a DeferAllScript preview.
ui_test_utils::NavigateToURL(browser(), url); ui_test_utils::NavigateToURL(browser(), url);
...@@ -613,9 +611,7 @@ IN_PROC_BROWSER_TEST_F( ...@@ -613,9 +611,7 @@ IN_PROC_BROWSER_TEST_F(
ukm::TestAutoSetUkmRecorder test_ukm_recorder; ukm::TestAutoSetUkmRecorder test_ukm_recorder;
// Wait for initial page load to complete. // Wait for initial page load to complete.
RetryForHistogramUntilCountReached( content::WaitForLoadStop(web_contents());
&histogram_tester, "PageLoad.DocumentTiming.NavigationToLoadEventFired",
1);
// Adjust the network triggering condition to not choose preview for this // Adjust the network triggering condition to not choose preview for this
// navigation. // navigation.
......
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