| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "base/test/histogram_tester.h" | 8 #include "base/test/histogram_tester.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "content/browser/frame_host/cross_site_transferring_request.h" | 10 #include "content/browser/frame_host/cross_site_transferring_request.h" |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 NULL /* instance */, -1 /* page_id */, kUrl1, Referrer(), | 894 NULL /* instance */, -1 /* page_id */, kUrl1, Referrer(), |
| 895 base::string16() /* title */, ui::PAGE_TRANSITION_TYPED, | 895 base::string16() /* title */, ui::PAGE_TRANSITION_TYPED, |
| 896 false /* is_renderer_init */); | 896 false /* is_renderer_init */); |
| 897 host = manager->Navigate(entry1); | 897 host = manager->Navigate(entry1); |
| 898 | 898 |
| 899 // The RenderFrameHost created in Init will be reused. | 899 // The RenderFrameHost created in Init will be reused. |
| 900 EXPECT_TRUE(host == manager->current_frame_host()); | 900 EXPECT_TRUE(host == manager->current_frame_host()); |
| 901 EXPECT_FALSE(manager->pending_frame_host()); | 901 EXPECT_FALSE(manager->pending_frame_host()); |
| 902 | 902 |
| 903 // Commit. | 903 // Commit. |
| 904 manager->DidNavigateFrame(host, true); | 904 manager->DidNavigateFrame(host, true, false); |
| 905 // Commit to SiteInstance should be delayed until RenderFrame commit. | 905 // Commit to SiteInstance should be delayed until RenderFrame commit. |
| 906 EXPECT_TRUE(host == manager->current_frame_host()); | 906 EXPECT_TRUE(host == manager->current_frame_host()); |
| 907 ASSERT_TRUE(host); | 907 ASSERT_TRUE(host); |
| 908 EXPECT_FALSE(host->GetSiteInstance()->HasSite()); | 908 EXPECT_FALSE(host->GetSiteInstance()->HasSite()); |
| 909 host->GetSiteInstance()->SetSite(kUrl1); | 909 host->GetSiteInstance()->SetSite(kUrl1); |
| 910 | 910 |
| 911 // 2) Navigate to next site. ------------------------- | 911 // 2) Navigate to next site. ------------------------- |
| 912 const GURL kUrl2("http://www.google.com/foo"); | 912 const GURL kUrl2("http://www.google.com/foo"); |
| 913 NavigationEntryImpl entry2( | 913 NavigationEntryImpl entry2( |
| 914 NULL /* instance */, -1 /* page_id */, kUrl2, | 914 NULL /* instance */, -1 /* page_id */, kUrl2, |
| 915 Referrer(kUrl1, blink::WebReferrerPolicyDefault), | 915 Referrer(kUrl1, blink::WebReferrerPolicyDefault), |
| 916 base::string16() /* title */, ui::PAGE_TRANSITION_LINK, | 916 base::string16() /* title */, ui::PAGE_TRANSITION_LINK, |
| 917 true /* is_renderer_init */); | 917 true /* is_renderer_init */); |
| 918 host = manager->Navigate(entry2); | 918 host = manager->Navigate(entry2); |
| 919 | 919 |
| 920 // The RenderFrameHost created in Init will be reused. | 920 // The RenderFrameHost created in Init will be reused. |
| 921 EXPECT_TRUE(host == manager->current_frame_host()); | 921 EXPECT_TRUE(host == manager->current_frame_host()); |
| 922 EXPECT_FALSE(manager->pending_frame_host()); | 922 EXPECT_FALSE(manager->pending_frame_host()); |
| 923 | 923 |
| 924 // Commit. | 924 // Commit. |
| 925 manager->DidNavigateFrame(host, true); | 925 manager->DidNavigateFrame(host, true, false); |
| 926 EXPECT_TRUE(host == manager->current_frame_host()); | 926 EXPECT_TRUE(host == manager->current_frame_host()); |
| 927 ASSERT_TRUE(host); | 927 ASSERT_TRUE(host); |
| 928 EXPECT_TRUE(host->GetSiteInstance()->HasSite()); | 928 EXPECT_TRUE(host->GetSiteInstance()->HasSite()); |
| 929 | 929 |
| 930 // 3) Cross-site navigate to next site. -------------- | 930 // 3) Cross-site navigate to next site. -------------- |
| 931 const GURL kUrl3("http://webkit.org/"); | 931 const GURL kUrl3("http://webkit.org/"); |
| 932 NavigationEntryImpl entry3( | 932 NavigationEntryImpl entry3( |
| 933 NULL /* instance */, -1 /* page_id */, kUrl3, | 933 NULL /* instance */, -1 /* page_id */, kUrl3, |
| 934 Referrer(kUrl2, blink::WebReferrerPolicyDefault), | 934 Referrer(kUrl2, blink::WebReferrerPolicyDefault), |
| 935 base::string16() /* title */, ui::PAGE_TRANSITION_LINK, | 935 base::string16() /* title */, ui::PAGE_TRANSITION_LINK, |
| 936 false /* is_renderer_init */); | 936 false /* is_renderer_init */); |
| 937 host = manager->Navigate(entry3); | 937 host = manager->Navigate(entry3); |
| 938 | 938 |
| 939 // A new RenderFrameHost should be created. | 939 // A new RenderFrameHost should be created. |
| 940 EXPECT_TRUE(manager->pending_frame_host()); | 940 EXPECT_TRUE(manager->pending_frame_host()); |
| 941 ASSERT_EQ(host, manager->pending_frame_host()); | 941 ASSERT_EQ(host, manager->pending_frame_host()); |
| 942 | 942 |
| 943 notifications.Reset(); | 943 notifications.Reset(); |
| 944 | 944 |
| 945 // Commit. | 945 // Commit. |
| 946 manager->DidNavigateFrame(manager->pending_frame_host(), true); | 946 manager->DidNavigateFrame(manager->pending_frame_host(), true, false); |
| 947 EXPECT_TRUE(host == manager->current_frame_host()); | 947 EXPECT_TRUE(host == manager->current_frame_host()); |
| 948 ASSERT_TRUE(host); | 948 ASSERT_TRUE(host); |
| 949 EXPECT_TRUE(host->GetSiteInstance()->HasSite()); | 949 EXPECT_TRUE(host->GetSiteInstance()->HasSite()); |
| 950 // Check the pending RenderFrameHost has been committed. | 950 // Check the pending RenderFrameHost has been committed. |
| 951 EXPECT_FALSE(manager->pending_frame_host()); | 951 EXPECT_FALSE(manager->pending_frame_host()); |
| 952 | 952 |
| 953 // We should observe a notification. | 953 // We should observe a notification. |
| 954 EXPECT_TRUE( | 954 EXPECT_TRUE( |
| 955 notifications.Check1AndReset(NOTIFICATION_RENDER_VIEW_HOST_CHANGED)); | 955 notifications.Check1AndReset(NOTIFICATION_RENDER_VIEW_HOST_CHANGED)); |
| 956 } | 956 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 986 // get loaded in between. | 986 // get loaded in between. |
| 987 EXPECT_TRUE(host->GetSiteInstance()->HasSite()); | 987 EXPECT_TRUE(host->GetSiteInstance()->HasSite()); |
| 988 EXPECT_EQ(kUrl, host->GetSiteInstance()->GetSiteURL()); | 988 EXPECT_EQ(kUrl, host->GetSiteInstance()->GetSiteURL()); |
| 989 | 989 |
| 990 // The Web UI is committed immediately because the RenderViewHost has not been | 990 // The Web UI is committed immediately because the RenderViewHost has not been |
| 991 // used yet. UpdateStateForNavigate() took the short cut path. | 991 // used yet. UpdateStateForNavigate() took the short cut path. |
| 992 EXPECT_FALSE(manager->pending_web_ui()); | 992 EXPECT_FALSE(manager->pending_web_ui()); |
| 993 EXPECT_TRUE(manager->web_ui()); | 993 EXPECT_TRUE(manager->web_ui()); |
| 994 | 994 |
| 995 // Commit. | 995 // Commit. |
| 996 manager->DidNavigateFrame(host, true); | 996 manager->DidNavigateFrame(host, true, false); |
| 997 EXPECT_TRUE( | 997 EXPECT_TRUE( |
| 998 host->render_view_host()->GetEnabledBindings() & BINDINGS_POLICY_WEB_UI); | 998 host->render_view_host()->GetEnabledBindings() & BINDINGS_POLICY_WEB_UI); |
| 999 } | 999 } |
| 1000 | 1000 |
| 1001 // Tests that we can open a WebUI link in a new tab from a WebUI page and still | 1001 // Tests that we can open a WebUI link in a new tab from a WebUI page and still |
| 1002 // grant the correct bindings. http://crbug.com/189101. | 1002 // grant the correct bindings. http://crbug.com/189101. |
| 1003 TEST_F(RenderFrameHostManagerTest, WebUIInNewTab) { | 1003 TEST_F(RenderFrameHostManagerTest, WebUIInNewTab) { |
| 1004 set_should_create_webui(true); | 1004 set_should_create_webui(true); |
| 1005 SiteInstance* blank_instance = SiteInstance::Create(browser_context()); | 1005 SiteInstance* blank_instance = SiteInstance::Create(browser_context()); |
| 1006 | 1006 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1024 RenderFrameHostImpl* host1 = manager1->Navigate(entry1); | 1024 RenderFrameHostImpl* host1 = manager1->Navigate(entry1); |
| 1025 | 1025 |
| 1026 // We should have a pending navigation to the WebUI RenderViewHost. | 1026 // We should have a pending navigation to the WebUI RenderViewHost. |
| 1027 // It should already have bindings. | 1027 // It should already have bindings. |
| 1028 EXPECT_EQ(host1, manager1->pending_frame_host()); | 1028 EXPECT_EQ(host1, manager1->pending_frame_host()); |
| 1029 EXPECT_NE(host1, manager1->current_frame_host()); | 1029 EXPECT_NE(host1, manager1->current_frame_host()); |
| 1030 EXPECT_TRUE( | 1030 EXPECT_TRUE( |
| 1031 host1->render_view_host()->GetEnabledBindings() & BINDINGS_POLICY_WEB_UI); | 1031 host1->render_view_host()->GetEnabledBindings() & BINDINGS_POLICY_WEB_UI); |
| 1032 | 1032 |
| 1033 // Commit and ensure we still have bindings. | 1033 // Commit and ensure we still have bindings. |
| 1034 manager1->DidNavigateFrame(host1, true); | 1034 manager1->DidNavigateFrame(host1, true, false); |
| 1035 SiteInstance* webui_instance = host1->GetSiteInstance(); | 1035 SiteInstance* webui_instance = host1->GetSiteInstance(); |
| 1036 EXPECT_EQ(host1, manager1->current_frame_host()); | 1036 EXPECT_EQ(host1, manager1->current_frame_host()); |
| 1037 EXPECT_TRUE( | 1037 EXPECT_TRUE( |
| 1038 host1->render_view_host()->GetEnabledBindings() & BINDINGS_POLICY_WEB_UI); | 1038 host1->render_view_host()->GetEnabledBindings() & BINDINGS_POLICY_WEB_UI); |
| 1039 | 1039 |
| 1040 // Now simulate clicking a link that opens in a new tab. | 1040 // Now simulate clicking a link that opens in a new tab. |
| 1041 scoped_ptr<TestWebContents> web_contents2( | 1041 scoped_ptr<TestWebContents> web_contents2( |
| 1042 TestWebContents::Create(browser_context(), webui_instance)); | 1042 TestWebContents::Create(browser_context(), webui_instance)); |
| 1043 RenderFrameHostManager* manager2 = | 1043 RenderFrameHostManager* manager2 = |
| 1044 web_contents2->GetRenderManagerForTesting(); | 1044 web_contents2->GetRenderManagerForTesting(); |
| 1045 // Make sure the new RVH is considered live. This is usually done in | 1045 // Make sure the new RVH is considered live. This is usually done in |
| 1046 // RenderWidgetHost::Init when opening a new tab from a link. | 1046 // RenderWidgetHost::Init when opening a new tab from a link. |
| 1047 manager2->current_host()->CreateRenderView( | 1047 manager2->current_host()->CreateRenderView( |
| 1048 base::string16(), -1, MSG_ROUTING_NONE, -1, false); | 1048 base::string16(), -1, MSG_ROUTING_NONE, -1, false); |
| 1049 | 1049 |
| 1050 const GURL kUrl2("chrome://foo/bar"); | 1050 const GURL kUrl2("chrome://foo/bar"); |
| 1051 NavigationEntryImpl entry2(NULL /* instance */, -1 /* page_id */, kUrl2, | 1051 NavigationEntryImpl entry2(NULL /* instance */, -1 /* page_id */, kUrl2, |
| 1052 Referrer(), base::string16() /* title */, | 1052 Referrer(), base::string16() /* title */, |
| 1053 ui::PAGE_TRANSITION_LINK, | 1053 ui::PAGE_TRANSITION_LINK, |
| 1054 true /* is_renderer_init */); | 1054 true /* is_renderer_init */); |
| 1055 RenderFrameHostImpl* host2 = manager2->Navigate(entry2); | 1055 RenderFrameHostImpl* host2 = manager2->Navigate(entry2); |
| 1056 | 1056 |
| 1057 // No cross-process transition happens because we are already in the right | 1057 // No cross-process transition happens because we are already in the right |
| 1058 // SiteInstance. We should grant bindings immediately. | 1058 // SiteInstance. We should grant bindings immediately. |
| 1059 EXPECT_EQ(host2, manager2->current_frame_host()); | 1059 EXPECT_EQ(host2, manager2->current_frame_host()); |
| 1060 EXPECT_TRUE( | 1060 EXPECT_TRUE( |
| 1061 host2->render_view_host()->GetEnabledBindings() & BINDINGS_POLICY_WEB_UI); | 1061 host2->render_view_host()->GetEnabledBindings() & BINDINGS_POLICY_WEB_UI); |
| 1062 | 1062 |
| 1063 manager2->DidNavigateFrame(host2, true); | 1063 manager2->DidNavigateFrame(host2, true, false); |
| 1064 } | 1064 } |
| 1065 | 1065 |
| 1066 // Tests that we don't end up in an inconsistent state if a page does a back and | 1066 // Tests that we don't end up in an inconsistent state if a page does a back and |
| 1067 // then reload. http://crbug.com/51680 | 1067 // then reload. http://crbug.com/51680 |
| 1068 // Also tests that only user-gesture navigations can interrupt cross-process | 1068 // Also tests that only user-gesture navigations can interrupt cross-process |
| 1069 // navigations. http://crbug.com/75195 | 1069 // navigations. http://crbug.com/75195 |
| 1070 TEST_F(RenderFrameHostManagerTest, PageDoesBackAndReload) { | 1070 TEST_F(RenderFrameHostManagerTest, PageDoesBackAndReload) { |
| 1071 const GURL kUrl1("http://www.google.com/"); | 1071 const GURL kUrl1("http://www.google.com/"); |
| 1072 const GURL kUrl2("http://www.evil-site.com/"); | 1072 const GURL kUrl2("http://www.evil-site.com/"); |
| 1073 | 1073 |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1516 base::string16() /* title */, ui::PAGE_TRANSITION_TYPED, | 1516 base::string16() /* title */, ui::PAGE_TRANSITION_TYPED, |
| 1517 false /* is_renderer_init */); | 1517 false /* is_renderer_init */); |
| 1518 host = manager->Navigate(entry1); | 1518 host = manager->Navigate(entry1); |
| 1519 | 1519 |
| 1520 // The RenderFrameHost created in Init will be reused. | 1520 // The RenderFrameHost created in Init will be reused. |
| 1521 EXPECT_TRUE(host == manager->current_frame_host()); | 1521 EXPECT_TRUE(host == manager->current_frame_host()); |
| 1522 EXPECT_FALSE(manager->pending_frame_host()); | 1522 EXPECT_FALSE(manager->pending_frame_host()); |
| 1523 EXPECT_EQ(manager->current_frame_host()->GetSiteInstance(), instance); | 1523 EXPECT_EQ(manager->current_frame_host()->GetSiteInstance(), instance); |
| 1524 | 1524 |
| 1525 // Commit. | 1525 // Commit. |
| 1526 manager->DidNavigateFrame(host, true); | 1526 manager->DidNavigateFrame(host, true, false); |
| 1527 // Commit to SiteInstance should be delayed until RenderFrame commit. | 1527 // Commit to SiteInstance should be delayed until RenderFrame commit. |
| 1528 EXPECT_EQ(host, manager->current_frame_host()); | 1528 EXPECT_EQ(host, manager->current_frame_host()); |
| 1529 ASSERT_TRUE(host); | 1529 ASSERT_TRUE(host); |
| 1530 EXPECT_TRUE(host->GetSiteInstance()->HasSite()); | 1530 EXPECT_TRUE(host->GetSiteInstance()->HasSite()); |
| 1531 | 1531 |
| 1532 // 2) Navigate to a different domain. ------------------------- | 1532 // 2) Navigate to a different domain. ------------------------- |
| 1533 // Guests stay in the same process on navigation. | 1533 // Guests stay in the same process on navigation. |
| 1534 const GURL kUrl2("http://www.chromium.org"); | 1534 const GURL kUrl2("http://www.chromium.org"); |
| 1535 NavigationEntryImpl entry2( | 1535 NavigationEntryImpl entry2( |
| 1536 NULL /* instance */, -1 /* page_id */, kUrl2, | 1536 NULL /* instance */, -1 /* page_id */, kUrl2, |
| 1537 Referrer(kUrl1, blink::WebReferrerPolicyDefault), | 1537 Referrer(kUrl1, blink::WebReferrerPolicyDefault), |
| 1538 base::string16() /* title */, ui::PAGE_TRANSITION_LINK, | 1538 base::string16() /* title */, ui::PAGE_TRANSITION_LINK, |
| 1539 true /* is_renderer_init */); | 1539 true /* is_renderer_init */); |
| 1540 host = manager->Navigate(entry2); | 1540 host = manager->Navigate(entry2); |
| 1541 | 1541 |
| 1542 // The RenderFrameHost created in Init will be reused. | 1542 // The RenderFrameHost created in Init will be reused. |
| 1543 EXPECT_EQ(host, manager->current_frame_host()); | 1543 EXPECT_EQ(host, manager->current_frame_host()); |
| 1544 EXPECT_FALSE(manager->pending_frame_host()); | 1544 EXPECT_FALSE(manager->pending_frame_host()); |
| 1545 | 1545 |
| 1546 // Commit. | 1546 // Commit. |
| 1547 manager->DidNavigateFrame(host, true); | 1547 manager->DidNavigateFrame(host, true, false); |
| 1548 EXPECT_EQ(host, manager->current_frame_host()); | 1548 EXPECT_EQ(host, manager->current_frame_host()); |
| 1549 ASSERT_TRUE(host); | 1549 ASSERT_TRUE(host); |
| 1550 EXPECT_EQ(host->GetSiteInstance(), instance); | 1550 EXPECT_EQ(host->GetSiteInstance(), instance); |
| 1551 } | 1551 } |
| 1552 | 1552 |
| 1553 // Test that we cancel a pending RVH if we close the tab while it's pending. | 1553 // Test that we cancel a pending RVH if we close the tab while it's pending. |
| 1554 // http://crbug.com/294697. | 1554 // http://crbug.com/294697. |
| 1555 TEST_F(RenderFrameHostManagerTest, NavigateWithEarlyClose) { | 1555 TEST_F(RenderFrameHostManagerTest, NavigateWithEarlyClose) { |
| 1556 TestNotificationTracker notifications; | 1556 TestNotificationTracker notifications; |
| 1557 | 1557 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1577 // The RenderFrameHost created in Init will be reused. | 1577 // The RenderFrameHost created in Init will be reused. |
| 1578 EXPECT_EQ(host, manager->current_frame_host()); | 1578 EXPECT_EQ(host, manager->current_frame_host()); |
| 1579 EXPECT_FALSE(manager->pending_frame_host()); | 1579 EXPECT_FALSE(manager->pending_frame_host()); |
| 1580 | 1580 |
| 1581 // We should observe a notification. | 1581 // We should observe a notification. |
| 1582 EXPECT_TRUE( | 1582 EXPECT_TRUE( |
| 1583 notifications.Check1AndReset(NOTIFICATION_RENDER_VIEW_HOST_CHANGED)); | 1583 notifications.Check1AndReset(NOTIFICATION_RENDER_VIEW_HOST_CHANGED)); |
| 1584 notifications.Reset(); | 1584 notifications.Reset(); |
| 1585 | 1585 |
| 1586 // Commit. | 1586 // Commit. |
| 1587 manager->DidNavigateFrame(host, true); | 1587 manager->DidNavigateFrame(host, true, false); |
| 1588 | 1588 |
| 1589 // Commit to SiteInstance should be delayed until RenderFrame commits. | 1589 // Commit to SiteInstance should be delayed until RenderFrame commits. |
| 1590 EXPECT_EQ(host, manager->current_frame_host()); | 1590 EXPECT_EQ(host, manager->current_frame_host()); |
| 1591 EXPECT_FALSE(host->GetSiteInstance()->HasSite()); | 1591 EXPECT_FALSE(host->GetSiteInstance()->HasSite()); |
| 1592 host->GetSiteInstance()->SetSite(kUrl1); | 1592 host->GetSiteInstance()->SetSite(kUrl1); |
| 1593 | 1593 |
| 1594 // 2) Cross-site navigate to next site. ------------------------- | 1594 // 2) Cross-site navigate to next site. ------------------------- |
| 1595 const GURL kUrl2("http://www.example.com"); | 1595 const GURL kUrl2("http://www.example.com"); |
| 1596 NavigationEntryImpl entry2( | 1596 NavigationEntryImpl entry2( |
| 1597 NULL /* instance */, -1 /* page_id */, kUrl2, Referrer(), | 1597 NULL /* instance */, -1 /* page_id */, kUrl2, Referrer(), |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1849 Referrer(), base::string16() /* title */, | 1849 Referrer(), base::string16() /* title */, |
| 1850 ui::PAGE_TRANSITION_TYPED, | 1850 ui::PAGE_TRANSITION_TYPED, |
| 1851 false /* is_renderer_init */); | 1851 false /* is_renderer_init */); |
| 1852 host = manager->Navigate(entry1); | 1852 host = manager->Navigate(entry1); |
| 1853 | 1853 |
| 1854 // The RenderFrameHost created in Init will be reused. | 1854 // The RenderFrameHost created in Init will be reused. |
| 1855 EXPECT_TRUE(host == manager->current_frame_host()); | 1855 EXPECT_TRUE(host == manager->current_frame_host()); |
| 1856 EXPECT_FALSE(manager->pending_frame_host()); | 1856 EXPECT_FALSE(manager->pending_frame_host()); |
| 1857 | 1857 |
| 1858 // Commit. | 1858 // Commit. |
| 1859 manager->DidNavigateFrame(host, true); | 1859 manager->DidNavigateFrame(host, true, false); |
| 1860 // Commit to SiteInstance should be delayed until RenderFrame commit. | 1860 // Commit to SiteInstance should be delayed until RenderFrame commit. |
| 1861 EXPECT_TRUE(host == manager->current_frame_host()); | 1861 EXPECT_TRUE(host == manager->current_frame_host()); |
| 1862 ASSERT_TRUE(host); | 1862 ASSERT_TRUE(host); |
| 1863 EXPECT_TRUE(host->GetSiteInstance()->HasSite()); | 1863 EXPECT_TRUE(host->GetSiteInstance()->HasSite()); |
| 1864 | 1864 |
| 1865 // 2) Cross-site navigate to next site. -------------- | 1865 // 2) Cross-site navigate to next site. -------------- |
| 1866 NavigationEntryImpl entry2(NULL /* instance */, -1 /* page_id */, kUrl2, | 1866 NavigationEntryImpl entry2(NULL /* instance */, -1 /* page_id */, kUrl2, |
| 1867 Referrer(kUrl1, blink::WebReferrerPolicyDefault), | 1867 Referrer(kUrl1, blink::WebReferrerPolicyDefault), |
| 1868 base::string16() /* title */, | 1868 base::string16() /* title */, |
| 1869 ui::PAGE_TRANSITION_LINK, | 1869 ui::PAGE_TRANSITION_LINK, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1902 #if 0 | 1902 #if 0 |
| 1903 // TODO(nick): Currently a proxy to the removed frame lingers in the parent. | 1903 // TODO(nick): Currently a proxy to the removed frame lingers in the parent. |
| 1904 // Enable this assert below once the proxies to the subframe are correctly | 1904 // Enable this assert below once the proxies to the subframe are correctly |
| 1905 // cleaned up after detach. | 1905 // cleaned up after detach. |
| 1906 ASSERT_TRUE(site_instance->HasOneRef()) | 1906 ASSERT_TRUE(site_instance->HasOneRef()) |
| 1907 << "This SiteInstance should be destroyable now."; | 1907 << "This SiteInstance should be destroyable now."; |
| 1908 #endif | 1908 #endif |
| 1909 } | 1909 } |
| 1910 | 1910 |
| 1911 } // namespace content | 1911 } // namespace content |
| OLD | NEW |