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

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

Issue 642813007: Drop CreateChildFrame messages when swapping out. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another round of fixes. Created 6 years, 2 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/navigator_impl_unittest.cc
diff --git a/content/browser/frame_host/navigator_impl_unittest.cc b/content/browser/frame_host/navigator_impl_unittest.cc
index 8b0ae22c17e5b5e4ca745890e6607255de9f16e7..97280dea5ea8f688b7709072513263efad8c914a 100644
--- a/content/browser/frame_host/navigator_impl_unittest.cc
+++ b/content/browser/frame_host/navigator_impl_unittest.cc
@@ -99,9 +99,12 @@ TEST_F(NavigatorTest, BrowserSideNavigationBeginNavigation) {
EnableBrowserSideNavigation();
// Add a subframe.
+ FrameTreeNode* root = contents()->GetFrameTree()->root();
TestRenderFrameHost* subframe_rfh = static_cast<TestRenderFrameHost*>(
contents()->GetFrameTree()->AddFrame(
- contents()->GetFrameTree()->root(), 14, "Child"));
+ root, root->current_frame_host()->GetProcess()->GetID(), 14,
+ "Child"));
+ EXPECT_TRUE(subframe_rfh);
FrameTreeNode* subframe_node = subframe_rfh->frame_tree_node();
SendRequestNavigation(subframe_rfh->frame_tree_node(), kUrl2);
@@ -116,13 +119,10 @@ TEST_F(NavigatorTest, BrowserSideNavigationBeginNavigation) {
EXPECT_FALSE(subframe_request->info_for_test()->is_main_frame);
EXPECT_TRUE(subframe_request->info_for_test()->parent_is_main_frame);
- FrameTreeNode* main_frame_node =
- contents()->GetMainFrame()->frame_tree_node();
- SendRequestNavigation(main_frame_node, kUrl3);
+ SendRequestNavigation(root, kUrl3);
// Simulate a BeginNavigation IPC on the main frame.
contents()->GetMainFrame()->SendBeginNavigationWithURL(kUrl3);
- NavigationRequest* main_request =
- GetNavigationRequestForFrameTreeNode(main_frame_node);
+ NavigationRequest* main_request = GetNavigationRequestForFrameTreeNode(root);
ASSERT_TRUE(main_request);
EXPECT_EQ(kUrl3, main_request->common_params().url);
EXPECT_EQ(kUrl3, main_request->info_for_test()->first_party_for_cookies);
« no previous file with comments | « content/browser/frame_host/frame_tree_unittest.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698