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

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

Issue 1208143002: Move existing kSitePerProcess checks to a policy-oracle object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@swapped_out_cmdline_checks
Patch Set: Attempt to fix compile. Created 5 years, 5 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/render_frame_host_manager_browsertest.cc
diff --git a/content/browser/frame_host/render_frame_host_manager_browsertest.cc b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
index 19e81a0875803714a81796585bd5a769904a8f17..7ad6055b62957cfc24f014c384b31748c8cb0b12 100644
--- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
@@ -328,11 +328,10 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest,
// Should have the same SiteInstance unless we're in site-per-process mode.
scoped_refptr<SiteInstance> blank_site_instance(
new_shell->web_contents()->GetSiteInstance());
- if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kSitePerProcess))
- EXPECT_EQ(orig_site_instance, blank_site_instance);
- else
+ if (AreAllSitesIsolatedForTesting())
EXPECT_NE(orig_site_instance, blank_site_instance);
+ else
+ EXPECT_EQ(orig_site_instance, blank_site_instance);
}
// Test for crbug.com/24447. Following a cross-site link with rel=noreferrer
@@ -373,11 +372,10 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest,
// Should have the same SiteInstance unless we're in site-per-process mode.
scoped_refptr<SiteInstance> noref_site_instance(
shell()->web_contents()->GetSiteInstance());
- if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kSitePerProcess))
- EXPECT_EQ(orig_site_instance, noref_site_instance);
- else
+ if (AreAllSitesIsolatedForTesting())
EXPECT_NE(orig_site_instance, noref_site_instance);
+ else
+ EXPECT_EQ(orig_site_instance, noref_site_instance);
}
// Test for crbug.com/116192. Targeted links should still work after the

Powered by Google App Engine
This is Rietveld 408576698