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 e5ce493262856eb2942f043ec63b5519c65a3894..63e14bc609524cdd1d6d33032e9e5488a583edeb 100644 |
| --- a/content/browser/frame_host/navigation_controller_impl_unittest.cc |
| +++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc |
| @@ -787,9 +787,12 @@ TEST_F(NavigationControllerTest, LoadURL_NewPending) { |
| kExistingURL2, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); |
| EXPECT_EQ(0U, notifications.size()); |
| - // After the beforeunload but before it commits, do a new navigation. |
| + // After the beforeunload but before it commits... |
|
nasko
2015/03/16 17:38:26
nit: Add a space after "commits".
carlosk
2015/03/16 18:11:12
Leaving as is at it seems more English-like to fol
|
| main_test_rfh()->PrepareForCommit(); |
| + |
| + // ... Do a new navigation. |
| const GURL kNewURL("http://see"); |
| + main_test_rfh()->SendRendererInitiatedNavigationRequest(kNewURL, true); |
| main_test_rfh()->PrepareForCommit(); |
| contents()->GetMainFrame()->SendNavigate(3, kNewURL); |
| @@ -1009,6 +1012,7 @@ TEST_F(NavigationControllerTest, LoadURL_AbortDoesntCancelPending) { |
| const GURL kNewURL("http://eh"); |
| controller.LoadURL( |
| kNewURL, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); |
| + main_test_rfh()->PrepareForCommit(); |
| EXPECT_EQ(0U, notifications.size()); |
| EXPECT_EQ(-1, controller.GetPendingEntryIndex()); |
| EXPECT_TRUE(controller.GetPendingEntry()); |
| @@ -1635,11 +1639,13 @@ TEST_F(NavigationControllerTest, Forward) { |
| const GURL url1("http://foo1"); |
| const GURL url2("http://foo2"); |
| + main_test_rfh()->SendRendererInitiatedNavigationRequest(url1, true); |
| main_test_rfh()->PrepareForCommit(); |
| main_test_rfh()->SendNavigate(0, url1); |
| EXPECT_EQ(1U, navigation_entry_committed_counter_); |
| navigation_entry_committed_counter_ = 0; |
| + main_test_rfh()->SendRendererInitiatedNavigationRequest(url2, true); |
| main_test_rfh()->PrepareForCommit(); |
| main_test_rfh()->SendNavigate(1, url2); |
| EXPECT_EQ(1U, navigation_entry_committed_counter_); |
| @@ -1704,10 +1710,12 @@ TEST_F(NavigationControllerTest, Forward_GeneratesNewPage) { |
| const GURL url2("http://foo2"); |
| const GURL url3("http://foo3"); |
| + main_test_rfh()->SendRendererInitiatedNavigationRequest(url1, true); |
| main_test_rfh()->PrepareForCommit(); |
| main_test_rfh()->SendNavigate(0, url1); |
| EXPECT_EQ(1U, navigation_entry_committed_counter_); |
| navigation_entry_committed_counter_ = 0; |
| + main_test_rfh()->SendRendererInitiatedNavigationRequest(url2, true); |
| main_test_rfh()->PrepareForCommit(); |
| main_test_rfh()->SendNavigate(1, url2); |
| EXPECT_EQ(1U, navigation_entry_committed_counter_); |