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

Unified Diff: content/browser/web_contents/web_contents_impl_unittest.cc

Issue 1785153005: Remove SiteIsolationPolicy::IsSwappedOutStateForbidden(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/web_contents/web_contents_impl_unittest.cc
diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
index e95c85363ff3e073e3d6f7cd00e434156e73086d..a62233bb9fafb935a420fc85f6e92467300e7c2d 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -588,10 +588,6 @@ TEST_F(WebContentsImplTest, CrossSiteBoundaries) {
if (IsBrowserSideNavigationEnabled())
contents()->GetMainFrame()->PrepareForCommit();
TestRenderFrameHost* goback_rfh = contents()->GetPendingMainFrame();
- if (!SiteIsolationPolicy::IsSwappedOutStateForbidden()) {
- // Recycling the rfh is a behavior specific to swappedout://
- EXPECT_EQ(orig_rfh, goback_rfh);
- }
EXPECT_TRUE(contents()->CrossProcessNavigationPending());
// Navigations should be suspended in goback_rfh until BeforeUnloadACK.
@@ -974,20 +970,15 @@ TEST_F(WebContentsImplTest, FindOpenerRVHWhenPending) {
popup->GetRenderManager()->GetOpenerRoutingID(instance);
RenderFrameProxyHost* proxy =
contents()->GetRenderManager()->GetRenderFrameProxyHost(instance);
- if (SiteIsolationPolicy::IsSwappedOutStateForbidden()) {
- EXPECT_TRUE(proxy);
- EXPECT_EQ(proxy->GetRoutingID(), opener_frame_routing_id);
-
- // Ensure that committing the navigation removes the proxy.
- int entry_id = controller().GetPendingEntry()->GetUniqueID();
- contents()->TestDidNavigate(pending_rfh, 2, entry_id, true, url2,
- ui::PAGE_TRANSITION_TYPED);
- EXPECT_FALSE(
- contents()->GetRenderManager()->GetRenderFrameProxyHost(instance));
- } else {
- EXPECT_FALSE(proxy);
- EXPECT_EQ(pending_rfh->GetRoutingID(), opener_frame_routing_id);
- }
+ EXPECT_TRUE(proxy);
+ EXPECT_EQ(proxy->GetRoutingID(), opener_frame_routing_id);
+
+ // Ensure that committing the navigation removes the proxy.
+ entry_id = controller().GetPendingEntry()->GetUniqueID();
+ contents()->TestDidNavigate(pending_rfh, 2, entry_id, true, url2,
+ ui::PAGE_TRANSITION_TYPED);
+ EXPECT_FALSE(
+ contents()->GetRenderManager()->GetRenderFrameProxyHost(instance));
}
// Tests that WebContentsImpl uses the current URL, not the SiteInstance's site,

Powered by Google App Engine
This is Rietveld 408576698