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

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: Rebase on ToT. 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/common/site_isolation_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a96c32222b7b3b4cc9b5cb95ee9f796edc75c927..ed559e766146ad0941d200d43caaa00fb2573a42 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,
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/common/site_isolation_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698