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

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

Issue 946543003: PlzNavigate: have renderer-initiated navigations be same-process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed SiteInstance direct URL check from tests. Created 5 years, 9 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
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 cb14e671d543d1c87251ababcc7d03d01e5e2e3b..2d44822f341ab85d80c4302b20a1762d72807622 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
@@ -789,6 +789,7 @@ TEST_F(NavigationControllerTest, LoadURL_NewPending) {
// After the beforeunload but before it commits, do a new navigation.
main_test_rfh()->PrepareForCommit();
const GURL kNewURL("http://see");
+ main_test_rfh()->SendRendererInitiatedNavigationRequest(kNewURL, true);
nasko 2015/03/16 16:22:42 This line seems a bit out of logical order with th
carlosk 2015/03/16 17:25:00 It seems to me that the 1st call to PrepareForComm
nasko 2015/03/16 17:38:26 Ah, makes it a lot more clear. Thanks!
main_test_rfh()->PrepareForCommit();
contents()->GetMainFrame()->SendNavigate(3, kNewURL);
@@ -1008,6 +1009,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());
@@ -1634,11 +1636,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_);
@@ -1703,10 +1707,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_);

Powered by Google App Engine
This is Rietveld 408576698