Chromium Code Reviews| 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()); |
|
nasko
2015/04/28 17:10:08
Why do we have different value for the state chang
Fabrice (no longer in Chrome)
2015/04/28 17:16:43
Because with PlzNavigate, the SendRendererInitiate
|
| + else |
| + EXPECT_EQ(2, delegate->navigation_state_change_count()); |
| contents()->SetDelegate(NULL); |
| } |