Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(436)

Unified Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 334553002: Unflake PrerenderOmniboxBrowserTest.PrerenderOmniboxAbandon. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_browsertest.cc
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc
index 650dc366f0763a7424ca2e069f5c9beffc26021c..7eb2a38d68cbad2171debb425f9954eb5e5ee7b8 100644
--- a/chrome/browser/prerender/prerender_browsertest.cc
+++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698