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

Unified Diff: content/browser/frame_host/navigation_controller_impl_unittest.cc

Issue 1108283002: PlzNavigate: Call DidStartLoading and DidStopLoading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Commentses. Created 5 years, 8 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 | « content/browser/frame_host/frame_tree_node.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_controller_impl_unittest.cc
diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc
index b44a1b0a074387ba554f8ff669f0fe7dbfc2f859..1ae6a9cca077f470a319453dc3eeb7e87798e96f 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
@@ -983,6 +983,7 @@ TEST_F(NavigationControllerTest, LoadURL_IgnorePreemptsPending) {
// Before that commits, a document.write and location.reload can cause the
// renderer to send a FrameNavigate with page_id -1.
+ // PlzNavigate: this will stop the old navigation and start a new one.
main_test_rfh()->SendRendererInitiatedNavigationRequest(kExistingURL, true);
main_test_rfh()->PrepareForCommit();
main_test_rfh()->SendNavigate(-1, kExistingURL);
@@ -992,7 +993,11 @@ TEST_F(NavigationControllerTest, LoadURL_IgnorePreemptsPending) {
EXPECT_EQ(-1, controller.GetPendingEntryIndex());
EXPECT_FALSE(controller.GetPendingEntry());
EXPECT_EQ(-1, controller.GetLastCommittedEntryIndex());
- EXPECT_EQ(2, delegate->navigation_state_change_count());
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableBrowserSideNavigation))
+ EXPECT_EQ(4, delegate->navigation_state_change_count());
+ else
+ EXPECT_EQ(2, delegate->navigation_state_change_count());
contents()->SetDelegate(NULL);
}
« no previous file with comments | « content/browser/frame_host/frame_tree_node.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698