| Index: content/child/site_isolation_stats_gatherer_browsertest.cc
|
| diff --git a/content/child/site_isolation_stats_gatherer_browsertest.cc b/content/child/site_isolation_stats_gatherer_browsertest.cc
|
| index 9150a97a046ab302d62251d72f585819fb6dc4ae..83be84591d651fc59532827f1b4bcc82feadf1a6 100644
|
| --- a/content/child/site_isolation_stats_gatherer_browsertest.cc
|
| +++ b/content/child/site_isolation_stats_gatherer_browsertest.cc
|
| @@ -23,7 +23,9 @@ namespace content {
|
| // resources from other websites, not constrained by the Same Origin Policy. We
|
| // are trying to verify that the renderer cannot fetch any cross-site document
|
| // responses even when the Same Origin Policy is turned off inside the renderer.
|
| -class SiteIsolationStatsGathererBrowserTest : public ContentBrowserTest {
|
| +class SiteIsolationStatsGathererBrowserTest
|
| + : public ContentBrowserTest,
|
| + public testing::WithParamInterface<bool> {
|
| public:
|
| SiteIsolationStatsGathererBrowserTest() {}
|
| ~SiteIsolationStatsGathererBrowserTest() override {}
|
| @@ -46,6 +48,11 @@ class SiteIsolationStatsGathererBrowserTest : public ContentBrowserTest {
|
| // Since we assume exploited renderer process, it can bypass the same origin
|
| // policy at will. Simulate that by passing the disable-web-security flag.
|
| command_line->AppendSwitch(switches::kDisableWebSecurity);
|
| +
|
| + if (GetParam()) {
|
| + command_line->AppendSwitchASCII("--enable-blink-features",
|
| + "LoadingWithMojo");
|
| + }
|
| }
|
|
|
| void SetUpOnMainThread() override {
|
| @@ -124,7 +131,7 @@ class SiteIsolationStatsGathererBrowserTest : public ContentBrowserTest {
|
| DISALLOW_COPY_AND_ASSIGN(SiteIsolationStatsGathererBrowserTest);
|
| };
|
|
|
| -IN_PROC_BROWSER_TEST_F(SiteIsolationStatsGathererBrowserTest,
|
| +IN_PROC_BROWSER_TEST_P(SiteIsolationStatsGathererBrowserTest,
|
| CrossSiteDocumentBlockingForMimeType) {
|
| // Load a page that issues illegal cross-site document requests to bar.com.
|
| // The page uses XHR to request HTML/XML/JSON documents from bar.com, and
|
| @@ -193,7 +200,7 @@ IN_PROC_BROWSER_TEST_F(SiteIsolationStatsGathererBrowserTest,
|
| }
|
| }
|
|
|
| -IN_PROC_BROWSER_TEST_F(SiteIsolationStatsGathererBrowserTest,
|
| +IN_PROC_BROWSER_TEST_P(SiteIsolationStatsGathererBrowserTest,
|
| CrossSiteDocumentBlockingForDifferentTargets) {
|
| // This webpage loads a cross-site HTML page in different targets such as
|
| // <img>,<link>,<embed>, etc. Since the requested document is blocked, and one
|
| @@ -208,4 +215,8 @@ IN_PROC_BROWSER_TEST_F(SiteIsolationStatsGathererBrowserTest,
|
| NavigateToURL(shell(), foo);
|
| }
|
|
|
| +INSTANTIATE_TEST_CASE_P(SiteIsolationStatsGathererBrowserTest,
|
| + SiteIsolationStatsGathererBrowserTest,
|
| + ::testing::Values(false, true));
|
| +
|
| } // namespace content
|
|
|