Commit 07983697 authored by davidben@chromium.org's avatar davidben@chromium.org

Unflake PrerenderOmniboxBrowserTest.PrerenderOmniboxAbandon.

The AutocompleteActionPredictor cancels prerenders in its destructor, so the
cancel and app terminating signals are likely racing. Disable the final status
check as it's not relevant to this test.

BUG=368721

Review URL: https://codereview.chromium.org/334553002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276796 0039d316-1c4b-4281-b951-d872f2087c98
parent dd60bcc8
......@@ -4380,10 +4380,8 @@ IN_PROC_BROWSER_TEST_F(PrerenderOmniboxBrowserTest, PrerenderOmniboxCancel) {
prerender->WaitForStop();
}
// Checks that closing the omnibox popup cancels an omnibox prerender.
// Disabled: flaky on all platforms. See http://crbug.com/368721.
IN_PROC_BROWSER_TEST_F(PrerenderOmniboxBrowserTest,
DISABLED_PrerenderOmniboxAbandon) {
// Checks that accepting omnibox input abandons an omnibox prerender.
IN_PROC_BROWSER_TEST_F(PrerenderOmniboxBrowserTest, PrerenderOmniboxAbandon) {
// Set the abandon timeout to something high so it does not introduce
// flakiness if the prerender times out before the test completes.
GetPrerenderManager()->mutable_config().abandon_time_to_live =
......@@ -4410,6 +4408,12 @@ IN_PROC_BROWSER_TEST_F(PrerenderOmniboxBrowserTest,
test_server()->GetURL("files/empty.html?2"),
FINAL_STATUS_APP_TERMINATING);
// The final status may be either FINAL_STATUS_APP_TERMINATING or
// FINAL_STATUS_CANCELLED. Although closing the omnibox will not cancel an
// abandoned prerender, the AutocompleteActionPredictor will cancel the
// predictor on destruction.
prerender->contents()->set_skip_final_checks(true);
// Navigate to the URL entered.
omnibox_view->model()->AcceptInput(CURRENT_TAB, false);
......
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