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

Side by Side Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 565263005: Remove the use of ProvisionalChangeToMainFrameUrl from prerender code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@redirsupervised
Patch Set: test Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <deque> 5 #include <deque>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 3398 matching lines...) Expand 10 before | Expand all | Expand 10 after
3409 // the hanging request to be scheduled. 3409 // the hanging request to be scheduled.
3410 ui_test_utils::NavigateToURLWithDisposition( 3410 ui_test_utils::NavigateToURLWithDisposition(
3411 current_browser(), kNoCommitUrl, NEW_FOREGROUND_TAB, 3411 current_browser(), kNoCommitUrl, NEW_FOREGROUND_TAB,
3412 ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB); 3412 ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB);
3413 hang_loop.Run(); 3413 hang_loop.Run();
3414 3414
3415 // Now interrupt that navigation and navigate to the destination URL. This 3415 // Now interrupt that navigation and navigate to the destination URL. This
3416 // should forcibly complete the previous navigation and also complete a 3416 // should forcibly complete the previous navigation and also complete a
3417 // WOULD_HAVE_BEEN_PRERENDERED navigation. 3417 // WOULD_HAVE_BEEN_PRERENDERED navigation.
3418 NavigateToDestURL(); 3418 NavigateToDestURL();
3419 histogram_tester().ExpectTotalCount("Prerender.none_PerceivedPLT", 2); 3419 histogram_tester().ExpectTotalCount("Prerender.none_PerceivedPLT", 1);
3420 histogram_tester().ExpectTotalCount("Prerender.none_PerceivedPLTMatched", 0); 3420 histogram_tester().ExpectTotalCount("Prerender.none_PerceivedPLTMatched", 0);
3421 histogram_tester().ExpectTotalCount( 3421 histogram_tester().ExpectTotalCount(
3422 "Prerender.none_PerceivedPLTMatchedComplete", 0); 3422 "Prerender.none_PerceivedPLTMatchedComplete", 0);
3423 histogram_tester().ExpectTotalCount("Prerender.websame_PerceivedPLT", 1); 3423 histogram_tester().ExpectTotalCount("Prerender.websame_PerceivedPLT", 1);
3424 histogram_tester().ExpectTotalCount("Prerender.websame_PerceivedPLTMatched", 3424 histogram_tester().ExpectTotalCount("Prerender.websame_PerceivedPLTMatched",
3425 0); 3425 0);
3426 histogram_tester().ExpectTotalCount( 3426 histogram_tester().ExpectTotalCount(
3427 "Prerender.websame_PerceivedPLTMatchedComplete", 1); 3427 "Prerender.websame_PerceivedPLTMatchedComplete", 1);
3428 } 3428 }
3429 3429
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
4428 4428
4429 // Navigate to the URL entered. 4429 // Navigate to the URL entered.
4430 omnibox_view->model()->AcceptInput(CURRENT_TAB, false); 4430 omnibox_view->model()->AcceptInput(CURRENT_TAB, false);
4431 4431
4432 // Prerender should be running, but abandoned. 4432 // Prerender should be running, but abandoned.
4433 EXPECT_TRUE( 4433 EXPECT_TRUE(
4434 GetAutocompleteActionPredictor()->IsPrerenderAbandonedForTesting()); 4434 GetAutocompleteActionPredictor()->IsPrerenderAbandonedForTesting());
4435 } 4435 }
4436 4436
4437 } // namespace prerender 4437 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_manager.h » ('j') | chrome/browser/prerender/prerender_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698