| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/frame_host/render_frame_host_manager.h" | 5 #include "content/browser/frame_host/render_frame_host_manager.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <tuple> | 9 #include <tuple> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1937 // http://crbug.com/444955. | 1937 // http://crbug.com/444955. |
| 1938 TEST_F(RenderFrameHostManagerTestWithSiteIsolation, DetachPendingChild) { | 1938 TEST_F(RenderFrameHostManagerTestWithSiteIsolation, DetachPendingChild) { |
| 1939 const GURL kUrlA("http://www.google.com/"); | 1939 const GURL kUrlA("http://www.google.com/"); |
| 1940 const GURL kUrlB("http://webkit.org/"); | 1940 const GURL kUrlB("http://webkit.org/"); |
| 1941 | 1941 |
| 1942 // Create a page with two child frames. | 1942 // Create a page with two child frames. |
| 1943 contents()->NavigateAndCommit(kUrlA); | 1943 contents()->NavigateAndCommit(kUrlA); |
| 1944 contents()->GetMainFrame()->OnCreateChildFrame( | 1944 contents()->GetMainFrame()->OnCreateChildFrame( |
| 1945 contents()->GetMainFrame()->GetProcess()->GetNextRoutingID(), | 1945 contents()->GetMainFrame()->GetProcess()->GetNextRoutingID(), |
| 1946 blink::WebTreeScopeType::Document, "frame_name", "uniqueName1", | 1946 blink::WebTreeScopeType::Document, "frame_name", "uniqueName1", |
| 1947 blink::WebSandboxFlags::None, FrameOwnerProperties()); | 1947 blink::WebSandboxFlags::None, ParsedFeaturePolicyHeader(), |
| 1948 FrameOwnerProperties()); |
| 1948 contents()->GetMainFrame()->OnCreateChildFrame( | 1949 contents()->GetMainFrame()->OnCreateChildFrame( |
| 1949 contents()->GetMainFrame()->GetProcess()->GetNextRoutingID(), | 1950 contents()->GetMainFrame()->GetProcess()->GetNextRoutingID(), |
| 1950 blink::WebTreeScopeType::Document, "frame_name", "uniqueName2", | 1951 blink::WebTreeScopeType::Document, "frame_name", "uniqueName2", |
| 1951 blink::WebSandboxFlags::None, FrameOwnerProperties()); | 1952 blink::WebSandboxFlags::None, ParsedFeaturePolicyHeader(), |
| 1953 FrameOwnerProperties()); |
| 1952 RenderFrameHostManager* root_manager = | 1954 RenderFrameHostManager* root_manager = |
| 1953 contents()->GetFrameTree()->root()->render_manager(); | 1955 contents()->GetFrameTree()->root()->render_manager(); |
| 1954 RenderFrameHostManager* iframe1 = | 1956 RenderFrameHostManager* iframe1 = |
| 1955 contents()->GetFrameTree()->root()->child_at(0)->render_manager(); | 1957 contents()->GetFrameTree()->root()->child_at(0)->render_manager(); |
| 1956 RenderFrameHostManager* iframe2 = | 1958 RenderFrameHostManager* iframe2 = |
| 1957 contents()->GetFrameTree()->root()->child_at(1)->render_manager(); | 1959 contents()->GetFrameTree()->root()->child_at(1)->render_manager(); |
| 1958 | 1960 |
| 1959 // 1) The first navigation. | 1961 // 1) The first navigation. |
| 1960 NavigationEntryImpl entryA(NULL /* instance */, kUrlA, | 1962 NavigationEntryImpl entryA(NULL /* instance */, kUrlA, |
| 1961 Referrer(), base::string16() /* title */, | 1963 Referrer(), base::string16() /* title */, |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2076 // Reload |contents1|. | 2078 // Reload |contents1|. |
| 2077 contents1->NavigateAndCommit(kUrl1); | 2079 contents1->NavigateAndCommit(kUrl1); |
| 2078 EXPECT_TRUE(contents1->GetMainFrame()->IsRenderFrameLive()); | 2080 EXPECT_TRUE(contents1->GetMainFrame()->IsRenderFrameLive()); |
| 2079 EXPECT_FALSE(contents2->GetMainFrame()->IsRenderFrameLive()); | 2081 EXPECT_FALSE(contents2->GetMainFrame()->IsRenderFrameLive()); |
| 2080 EXPECT_EQ(contents1->GetSiteInstance(), contents2->GetSiteInstance()); | 2082 EXPECT_EQ(contents1->GetSiteInstance(), contents2->GetSiteInstance()); |
| 2081 | 2083 |
| 2082 // |contents1| creates an out of process iframe. | 2084 // |contents1| creates an out of process iframe. |
| 2083 contents1->GetMainFrame()->OnCreateChildFrame( | 2085 contents1->GetMainFrame()->OnCreateChildFrame( |
| 2084 contents1->GetMainFrame()->GetProcess()->GetNextRoutingID(), | 2086 contents1->GetMainFrame()->GetProcess()->GetNextRoutingID(), |
| 2085 blink::WebTreeScopeType::Document, "frame_name", "uniqueName1", | 2087 blink::WebTreeScopeType::Document, "frame_name", "uniqueName1", |
| 2086 blink::WebSandboxFlags::None, FrameOwnerProperties()); | 2088 blink::WebSandboxFlags::None, ParsedFeaturePolicyHeader(), |
| 2089 FrameOwnerProperties()); |
| 2087 RenderFrameHostManager* iframe = | 2090 RenderFrameHostManager* iframe = |
| 2088 contents()->GetFrameTree()->root()->child_at(0)->render_manager(); | 2091 contents()->GetFrameTree()->root()->child_at(0)->render_manager(); |
| 2089 NavigationEntryImpl entry(NULL /* instance */, kUrl2, | 2092 NavigationEntryImpl entry(NULL /* instance */, kUrl2, |
| 2090 Referrer(kUrl1, blink::WebReferrerPolicyDefault), | 2093 Referrer(kUrl1, blink::WebReferrerPolicyDefault), |
| 2091 base::string16() /* title */, | 2094 base::string16() /* title */, |
| 2092 ui::PAGE_TRANSITION_LINK, | 2095 ui::PAGE_TRANSITION_LINK, |
| 2093 false /* is_renderer_init */); | 2096 false /* is_renderer_init */); |
| 2094 RenderFrameHostImpl* cross_site = NavigateToEntry(iframe, entry); | 2097 RenderFrameHostImpl* cross_site = NavigateToEntry(iframe, entry); |
| 2095 iframe->DidNavigateFrame(cross_site, true); | 2098 iframe->DidNavigateFrame(cross_site, true); |
| 2096 | 2099 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 2125 // Make sure the initial process is live so that the pending WebUI navigation | 2128 // Make sure the initial process is live so that the pending WebUI navigation |
| 2126 // does not commit immediately. Give the page a subframe as well. | 2129 // does not commit immediately. Give the page a subframe as well. |
| 2127 const GURL kUrl1("http://foo.com"); | 2130 const GURL kUrl1("http://foo.com"); |
| 2128 RenderFrameHostImpl* main_rfh = contents()->GetMainFrame(); | 2131 RenderFrameHostImpl* main_rfh = contents()->GetMainFrame(); |
| 2129 NavigateAndCommit(kUrl1); | 2132 NavigateAndCommit(kUrl1); |
| 2130 EXPECT_TRUE(main_rfh->render_view_host()->IsRenderViewLive()); | 2133 EXPECT_TRUE(main_rfh->render_view_host()->IsRenderViewLive()); |
| 2131 EXPECT_TRUE(main_rfh->IsRenderFrameLive()); | 2134 EXPECT_TRUE(main_rfh->IsRenderFrameLive()); |
| 2132 main_rfh->OnCreateChildFrame(main_rfh->GetProcess()->GetNextRoutingID(), | 2135 main_rfh->OnCreateChildFrame(main_rfh->GetProcess()->GetNextRoutingID(), |
| 2133 blink::WebTreeScopeType::Document, std::string(), | 2136 blink::WebTreeScopeType::Document, std::string(), |
| 2134 "uniqueName1", blink::WebSandboxFlags::None, | 2137 "uniqueName1", blink::WebSandboxFlags::None, |
| 2138 ParsedFeaturePolicyHeader(), |
| 2135 FrameOwnerProperties()); | 2139 FrameOwnerProperties()); |
| 2136 RenderFrameHostManager* subframe_rfhm = | 2140 RenderFrameHostManager* subframe_rfhm = |
| 2137 contents()->GetFrameTree()->root()->child_at(0)->render_manager(); | 2141 contents()->GetFrameTree()->root()->child_at(0)->render_manager(); |
| 2138 | 2142 |
| 2139 // Start a pending WebUI navigation in the main frame and verify that the | 2143 // Start a pending WebUI navigation in the main frame and verify that the |
| 2140 // pending RVH has bindings. | 2144 // pending RVH has bindings. |
| 2141 const GURL kWebUIUrl("chrome://foo"); | 2145 const GURL kWebUIUrl("chrome://foo"); |
| 2142 NavigationEntryImpl webui_entry( | 2146 NavigationEntryImpl webui_entry( |
| 2143 nullptr /* instance */, kWebUIUrl, Referrer(), | 2147 nullptr /* instance */, kWebUIUrl, Referrer(), |
| 2144 base::string16() /* title */, ui::PAGE_TRANSITION_TYPED, | 2148 base::string16() /* title */, ui::PAGE_TRANSITION_TYPED, |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2283 // root3) should be put on the list of nodes that will need their frame openers | 2287 // root3) should be put on the list of nodes that will need their frame openers |
| 2284 // set separately in a second pass, since their opener routing IDs won't be | 2288 // set separately in a second pass, since their opener routing IDs won't be |
| 2285 // available during the first pass of CreateOpenerProxies. | 2289 // available during the first pass of CreateOpenerProxies. |
| 2286 TEST_F(RenderFrameHostManagerTest, TraverseComplexOpenerChain) { | 2290 TEST_F(RenderFrameHostManagerTest, TraverseComplexOpenerChain) { |
| 2287 contents()->NavigateAndCommit(GURL("http://tab1.com")); | 2291 contents()->NavigateAndCommit(GURL("http://tab1.com")); |
| 2288 FrameTree* tree1 = contents()->GetFrameTree(); | 2292 FrameTree* tree1 = contents()->GetFrameTree(); |
| 2289 FrameTreeNode* root1 = tree1->root(); | 2293 FrameTreeNode* root1 = tree1->root(); |
| 2290 int process_id = root1->current_frame_host()->GetProcess()->GetID(); | 2294 int process_id = root1->current_frame_host()->GetProcess()->GetID(); |
| 2291 tree1->AddFrame(root1, process_id, 12, blink::WebTreeScopeType::Document, | 2295 tree1->AddFrame(root1, process_id, 12, blink::WebTreeScopeType::Document, |
| 2292 std::string(), "uniqueName0", blink::WebSandboxFlags::None, | 2296 std::string(), "uniqueName0", blink::WebSandboxFlags::None, |
| 2293 FrameOwnerProperties()); | 2297 ParsedFeaturePolicyHeader(), FrameOwnerProperties()); |
| 2294 tree1->AddFrame(root1, process_id, 13, blink::WebTreeScopeType::Document, | 2298 tree1->AddFrame(root1, process_id, 13, blink::WebTreeScopeType::Document, |
| 2295 std::string(), "uniqueName1", blink::WebSandboxFlags::None, | 2299 std::string(), "uniqueName1", blink::WebSandboxFlags::None, |
| 2296 FrameOwnerProperties()); | 2300 ParsedFeaturePolicyHeader(), FrameOwnerProperties()); |
| 2297 | 2301 |
| 2298 std::unique_ptr<TestWebContents> tab2( | 2302 std::unique_ptr<TestWebContents> tab2( |
| 2299 TestWebContents::Create(browser_context(), nullptr)); | 2303 TestWebContents::Create(browser_context(), nullptr)); |
| 2300 tab2->NavigateAndCommit(GURL("http://tab2.com")); | 2304 tab2->NavigateAndCommit(GURL("http://tab2.com")); |
| 2301 FrameTree* tree2 = tab2->GetFrameTree(); | 2305 FrameTree* tree2 = tab2->GetFrameTree(); |
| 2302 FrameTreeNode* root2 = tree2->root(); | 2306 FrameTreeNode* root2 = tree2->root(); |
| 2303 process_id = root2->current_frame_host()->GetProcess()->GetID(); | 2307 process_id = root2->current_frame_host()->GetProcess()->GetID(); |
| 2304 tree2->AddFrame(root2, process_id, 22, blink::WebTreeScopeType::Document, | 2308 tree2->AddFrame(root2, process_id, 22, blink::WebTreeScopeType::Document, |
| 2305 std::string(), "uniqueName2", blink::WebSandboxFlags::None, | 2309 std::string(), "uniqueName2", blink::WebSandboxFlags::None, |
| 2306 FrameOwnerProperties()); | 2310 ParsedFeaturePolicyHeader(), FrameOwnerProperties()); |
| 2307 tree2->AddFrame(root2, process_id, 23, blink::WebTreeScopeType::Document, | 2311 tree2->AddFrame(root2, process_id, 23, blink::WebTreeScopeType::Document, |
| 2308 std::string(), "uniqueName3", blink::WebSandboxFlags::None, | 2312 std::string(), "uniqueName3", blink::WebSandboxFlags::None, |
| 2309 FrameOwnerProperties()); | 2313 ParsedFeaturePolicyHeader(), FrameOwnerProperties()); |
| 2310 | 2314 |
| 2311 std::unique_ptr<TestWebContents> tab3( | 2315 std::unique_ptr<TestWebContents> tab3( |
| 2312 TestWebContents::Create(browser_context(), nullptr)); | 2316 TestWebContents::Create(browser_context(), nullptr)); |
| 2313 FrameTree* tree3 = tab3->GetFrameTree(); | 2317 FrameTree* tree3 = tab3->GetFrameTree(); |
| 2314 FrameTreeNode* root3 = tree3->root(); | 2318 FrameTreeNode* root3 = tree3->root(); |
| 2315 | 2319 |
| 2316 std::unique_ptr<TestWebContents> tab4( | 2320 std::unique_ptr<TestWebContents> tab4( |
| 2317 TestWebContents::Create(browser_context(), nullptr)); | 2321 TestWebContents::Create(browser_context(), nullptr)); |
| 2318 tab4->NavigateAndCommit(GURL("http://tab4.com")); | 2322 tab4->NavigateAndCommit(GURL("http://tab4.com")); |
| 2319 FrameTree* tree4 = tab4->GetFrameTree(); | 2323 FrameTree* tree4 = tab4->GetFrameTree(); |
| 2320 FrameTreeNode* root4 = tree4->root(); | 2324 FrameTreeNode* root4 = tree4->root(); |
| 2321 process_id = root4->current_frame_host()->GetProcess()->GetID(); | 2325 process_id = root4->current_frame_host()->GetProcess()->GetID(); |
| 2322 tree4->AddFrame(root4, process_id, 42, blink::WebTreeScopeType::Document, | 2326 tree4->AddFrame(root4, process_id, 42, blink::WebTreeScopeType::Document, |
| 2323 std::string(), "uniqueName4", blink::WebSandboxFlags::None, | 2327 std::string(), "uniqueName4", blink::WebSandboxFlags::None, |
| 2324 FrameOwnerProperties()); | 2328 ParsedFeaturePolicyHeader(), FrameOwnerProperties()); |
| 2325 | 2329 |
| 2326 root1->child_at(1)->SetOpener(root1->child_at(1)); | 2330 root1->child_at(1)->SetOpener(root1->child_at(1)); |
| 2327 root1->SetOpener(root2->child_at(1)); | 2331 root1->SetOpener(root2->child_at(1)); |
| 2328 root2->SetOpener(root3); | 2332 root2->SetOpener(root3); |
| 2329 root2->child_at(0)->SetOpener(root4); | 2333 root2->child_at(0)->SetOpener(root4); |
| 2330 root2->child_at(1)->SetOpener(root4); | 2334 root2->child_at(1)->SetOpener(root4); |
| 2331 root4->child_at(0)->SetOpener(root3); | 2335 root4->child_at(0)->SetOpener(root3); |
| 2332 | 2336 |
| 2333 std::vector<FrameTree*> opener_frame_trees; | 2337 std::vector<FrameTree*> opener_frame_trees; |
| 2334 base::hash_set<FrameTreeNode*> nodes_with_back_links; | 2338 base::hash_set<FrameTreeNode*> nodes_with_back_links; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 2363 const GURL kUrlA("http://a.com/"); | 2367 const GURL kUrlA("http://a.com/"); |
| 2364 const GURL kUrlB("http://b.com/"); | 2368 const GURL kUrlB("http://b.com/"); |
| 2365 const GURL kUrlC("http://c.com/"); | 2369 const GURL kUrlC("http://c.com/"); |
| 2366 | 2370 |
| 2367 // Set up a page at a.com with three subframes: two for b.com and one for | 2371 // Set up a page at a.com with three subframes: two for b.com and one for |
| 2368 // c.com. | 2372 // c.com. |
| 2369 contents()->NavigateAndCommit(kUrlA); | 2373 contents()->NavigateAndCommit(kUrlA); |
| 2370 main_test_rfh()->OnCreateChildFrame( | 2374 main_test_rfh()->OnCreateChildFrame( |
| 2371 main_test_rfh()->GetProcess()->GetNextRoutingID(), | 2375 main_test_rfh()->GetProcess()->GetNextRoutingID(), |
| 2372 blink::WebTreeScopeType::Document, "frame1", "uniqueName1", | 2376 blink::WebTreeScopeType::Document, "frame1", "uniqueName1", |
| 2373 blink::WebSandboxFlags::None, FrameOwnerProperties()); | 2377 blink::WebSandboxFlags::None, ParsedFeaturePolicyHeader(), |
| 2378 FrameOwnerProperties()); |
| 2374 main_test_rfh()->OnCreateChildFrame( | 2379 main_test_rfh()->OnCreateChildFrame( |
| 2375 main_test_rfh()->GetProcess()->GetNextRoutingID(), | 2380 main_test_rfh()->GetProcess()->GetNextRoutingID(), |
| 2376 blink::WebTreeScopeType::Document, "frame2", "uniqueName2", | 2381 blink::WebTreeScopeType::Document, "frame2", "uniqueName2", |
| 2377 blink::WebSandboxFlags::None, FrameOwnerProperties()); | 2382 blink::WebSandboxFlags::None, ParsedFeaturePolicyHeader(), |
| 2383 FrameOwnerProperties()); |
| 2378 main_test_rfh()->OnCreateChildFrame( | 2384 main_test_rfh()->OnCreateChildFrame( |
| 2379 main_test_rfh()->GetProcess()->GetNextRoutingID(), | 2385 main_test_rfh()->GetProcess()->GetNextRoutingID(), |
| 2380 blink::WebTreeScopeType::Document, "frame3", "uniqueName3", | 2386 blink::WebTreeScopeType::Document, "frame3", "uniqueName3", |
| 2381 blink::WebSandboxFlags::None, FrameOwnerProperties()); | 2387 blink::WebSandboxFlags::None, ParsedFeaturePolicyHeader(), |
| 2388 FrameOwnerProperties()); |
| 2382 | 2389 |
| 2383 FrameTreeNode* root = contents()->GetFrameTree()->root(); | 2390 FrameTreeNode* root = contents()->GetFrameTree()->root(); |
| 2384 RenderFrameHostManager* child1 = root->child_at(0)->render_manager(); | 2391 RenderFrameHostManager* child1 = root->child_at(0)->render_manager(); |
| 2385 RenderFrameHostManager* child2 = root->child_at(1)->render_manager(); | 2392 RenderFrameHostManager* child2 = root->child_at(1)->render_manager(); |
| 2386 RenderFrameHostManager* child3 = root->child_at(2)->render_manager(); | 2393 RenderFrameHostManager* child3 = root->child_at(2)->render_manager(); |
| 2387 | 2394 |
| 2388 // Navigate first two subframes to B. | 2395 // Navigate first two subframes to B. |
| 2389 NavigationEntryImpl entryB(nullptr /* instance */, kUrlB, | 2396 NavigationEntryImpl entryB(nullptr /* instance */, kUrlB, |
| 2390 Referrer(kUrlA, blink::WebReferrerPolicyDefault), | 2397 Referrer(kUrlA, blink::WebReferrerPolicyDefault), |
| 2391 base::string16() /* title */, | 2398 base::string16() /* title */, |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2461 | 2468 |
| 2462 const GURL kUrlA("http://a.com/"); | 2469 const GURL kUrlA("http://a.com/"); |
| 2463 const GURL kUrlB("http://b.com/"); | 2470 const GURL kUrlB("http://b.com/"); |
| 2464 const GURL kUrlC("http://c.com/"); | 2471 const GURL kUrlC("http://c.com/"); |
| 2465 | 2472 |
| 2466 // Set up a page at a.com with a b.com subframe. | 2473 // Set up a page at a.com with a b.com subframe. |
| 2467 contents()->NavigateAndCommit(kUrlA); | 2474 contents()->NavigateAndCommit(kUrlA); |
| 2468 main_test_rfh()->OnCreateChildFrame( | 2475 main_test_rfh()->OnCreateChildFrame( |
| 2469 main_test_rfh()->GetProcess()->GetNextRoutingID(), | 2476 main_test_rfh()->GetProcess()->GetNextRoutingID(), |
| 2470 blink::WebTreeScopeType::Document, "frame1", "uniqueName1", | 2477 blink::WebTreeScopeType::Document, "frame1", "uniqueName1", |
| 2471 blink::WebSandboxFlags::None, FrameOwnerProperties()); | 2478 blink::WebSandboxFlags::None, ParsedFeaturePolicyHeader(), |
| 2479 FrameOwnerProperties()); |
| 2472 | 2480 |
| 2473 FrameTreeNode* root = contents()->GetFrameTree()->root(); | 2481 FrameTreeNode* root = contents()->GetFrameTree()->root(); |
| 2474 RenderFrameHostManager* child = root->child_at(0)->render_manager(); | 2482 RenderFrameHostManager* child = root->child_at(0)->render_manager(); |
| 2475 | 2483 |
| 2476 // Navigate subframe to B. | 2484 // Navigate subframe to B. |
| 2477 NavigationEntryImpl entryB(nullptr /* instance */, kUrlB, | 2485 NavigationEntryImpl entryB(nullptr /* instance */, kUrlB, |
| 2478 Referrer(kUrlA, blink::WebReferrerPolicyDefault), | 2486 Referrer(kUrlA, blink::WebReferrerPolicyDefault), |
| 2479 base::string16() /* title */, | 2487 base::string16() /* title */, |
| 2480 ui::PAGE_TRANSITION_LINK, | 2488 ui::PAGE_TRANSITION_LINK, |
| 2481 false /* is_renderer_init */); | 2489 false /* is_renderer_init */); |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3005 const GURL kUrl1("http://www.google.test"); | 3013 const GURL kUrl1("http://www.google.test"); |
| 3006 const GURL kUrl2("http://www.google2.test"); | 3014 const GURL kUrl2("http://www.google2.test"); |
| 3007 const GURL kUrl3("http://www.google2.test/foo"); | 3015 const GURL kUrl3("http://www.google2.test/foo"); |
| 3008 | 3016 |
| 3009 contents()->NavigateAndCommit(kUrl1); | 3017 contents()->NavigateAndCommit(kUrl1); |
| 3010 | 3018 |
| 3011 // Create a child frame and navigate it cross-site. | 3019 // Create a child frame and navigate it cross-site. |
| 3012 main_test_rfh()->OnCreateChildFrame( | 3020 main_test_rfh()->OnCreateChildFrame( |
| 3013 main_test_rfh()->GetProcess()->GetNextRoutingID(), | 3021 main_test_rfh()->GetProcess()->GetNextRoutingID(), |
| 3014 blink::WebTreeScopeType::Document, "frame1", "uniqueName1", | 3022 blink::WebTreeScopeType::Document, "frame1", "uniqueName1", |
| 3015 blink::WebSandboxFlags::None, FrameOwnerProperties()); | 3023 blink::WebSandboxFlags::None, ParsedFeaturePolicyHeader(), |
| 3024 FrameOwnerProperties()); |
| 3016 | 3025 |
| 3017 FrameTreeNode* root = contents()->GetFrameTree()->root(); | 3026 FrameTreeNode* root = contents()->GetFrameTree()->root(); |
| 3018 RenderFrameHostManager* child = root->child_at(0)->render_manager(); | 3027 RenderFrameHostManager* child = root->child_at(0)->render_manager(); |
| 3019 | 3028 |
| 3020 // Navigate subframe to kUrl2. | 3029 // Navigate subframe to kUrl2. |
| 3021 NavigationEntryImpl entry1(nullptr /* instance */, kUrl2, | 3030 NavigationEntryImpl entry1(nullptr /* instance */, kUrl2, |
| 3022 Referrer(kUrl1, blink::WebReferrerPolicyDefault), | 3031 Referrer(kUrl1, blink::WebReferrerPolicyDefault), |
| 3023 base::string16() /* title */, | 3032 base::string16() /* title */, |
| 3024 ui::PAGE_TRANSITION_LINK, | 3033 ui::PAGE_TRANSITION_LINK, |
| 3025 false /* is_renderer_init */); | 3034 false /* is_renderer_init */); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3150 ASSERT_FALSE(delete_observer.deleted()); | 3159 ASSERT_FALSE(delete_observer.deleted()); |
| 3151 EXPECT_FALSE(initial_rfh->is_active()); | 3160 EXPECT_FALSE(initial_rfh->is_active()); |
| 3152 | 3161 |
| 3153 // The initial RFH receives a DidStartProvisionalLoad IPC. It should not | 3162 // The initial RFH receives a DidStartProvisionalLoad IPC. It should not |
| 3154 // create a NavigationHandle. | 3163 // create a NavigationHandle. |
| 3155 initial_rfh->SimulateNavigationStart(kUrl3); | 3164 initial_rfh->SimulateNavigationStart(kUrl3); |
| 3156 EXPECT_FALSE(initial_rfh->navigation_handle()); | 3165 EXPECT_FALSE(initial_rfh->navigation_handle()); |
| 3157 } | 3166 } |
| 3158 | 3167 |
| 3159 } // namespace content | 3168 } // namespace content |
| OLD | NEW |