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 130790bec4097f0d29a9bdc6cfb84a9f78f56569..fe2197a92a75e1bcba7e9efa723e80f033614881 100644 |
--- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc |
+++ b/content/browser/frame_host/render_frame_host_manager_browsertest.cc |
@@ -30,6 +30,7 @@ |
#include "content/public/common/file_chooser_file_info.h" |
#include "content/public/common/file_chooser_params.h" |
#include "content/public/common/page_state.h" |
+#include "content/public/common/site_isolation_policy.h" |
#include "content/public/common/url_constants.h" |
#include "content/public/test/browser_test_utils.h" |
#include "content/public/test/content_browser_test.h" |
@@ -341,11 +342,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 (SiteIsolationPolicy::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 |
@@ -386,11 +386,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 (SiteIsolationPolicy::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 |