Commit d8899c19 authored by Takashi Toyoshima's avatar Takashi Toyoshima Committed by Commit Bot

OOR-CORS: Remove Parameter Tests

Now that we run tests with OOR-CORS at the fyi linux-oor-cors-rel bot,
we do not need to have parameter tests for each case.

Bug: 1000554
Change-Id: I3f682a788ceb7d6aa9b342c490b17e32edd51e96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1792682
Auto-Submit: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695945}
parent 8d42a76e
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/extensions/extension_action_runner.h" #include "chrome/browser/extensions/extension_action_runner.h"
#include "chrome/browser/extensions/extension_apitest.h" #include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_service.h"
...@@ -30,7 +29,6 @@ ...@@ -30,7 +29,6 @@
#include "net/base/filename_util.h" #include "net/base/filename_util.h"
#include "net/dns/mock_host_resolver.h" #include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h" #include "net/test/embedded_test_server/embedded_test_server.h"
#include "services/network/public/cpp/features.h"
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/extensions/extension_tab_util_delegate_chromeos.h" #include "chrome/browser/chromeos/extensions/extension_tab_util_delegate_chromeos.h"
...@@ -40,51 +38,24 @@ ...@@ -40,51 +38,24 @@
namespace extensions { namespace extensions {
namespace { namespace {
enum class TestMode { class ExtensionActiveTabTest : public ExtensionApiTest {
kWithBlinkCors,
kWithOutOfBlinkCors,
};
class ExtensionActiveTabTest : public ExtensionApiTest,
public testing::WithParamInterface<TestMode> {
public: public:
ExtensionActiveTabTest() = default; ExtensionActiveTabTest() = default;
// ExtensionApiTest override: // ExtensionApiTest override:
void SetUp() override {
std::vector<base::Feature> enabled_features;
std::vector<base::Feature> disabled_features;
if (ShouldEnableOutOfBlinkCors()) {
enabled_features.push_back(network::features::kOutOfBlinkCors);
} else {
disabled_features.push_back(network::features::kOutOfBlinkCors);
}
scoped_feature_list_.InitWithFeatures(enabled_features, disabled_features);
ExtensionApiTest::SetUp();
}
void SetUpOnMainThread() override { void SetUpOnMainThread() override {
ExtensionApiTest::SetUpOnMainThread(); ExtensionApiTest::SetUpOnMainThread();
// Map all hosts to localhost. // Map all hosts to localhost.
host_resolver()->AddRule("*", "127.0.0.1"); host_resolver()->AddRule("*", "127.0.0.1");
ASSERT_EQ(ShouldEnableOutOfBlinkCors(),
base::FeatureList::IsEnabled(network::features::kOutOfBlinkCors));
} }
private: private:
bool ShouldEnableOutOfBlinkCors() const {
TestMode mode = GetParam();
return mode == TestMode::kWithOutOfBlinkCors;
}
base::test::ScopedFeatureList scoped_feature_list_;
DISALLOW_COPY_AND_ASSIGN(ExtensionActiveTabTest); DISALLOW_COPY_AND_ASSIGN(ExtensionActiveTabTest);
}; };
IN_PROC_BROWSER_TEST_P(ExtensionActiveTabTest, ActiveTab) { IN_PROC_BROWSER_TEST_F(ExtensionActiveTabTest, ActiveTab) {
ASSERT_TRUE(StartEmbeddedTestServer()); ASSERT_TRUE(StartEmbeddedTestServer());
ExtensionTestMessageListener background_page_ready("ready", ExtensionTestMessageListener background_page_ready("ready",
...@@ -177,7 +148,7 @@ IN_PROC_BROWSER_TEST_P(ExtensionActiveTabTest, ActiveTab) { ...@@ -177,7 +148,7 @@ IN_PROC_BROWSER_TEST_P(ExtensionActiveTabTest, ActiveTab) {
} }
} }
IN_PROC_BROWSER_TEST_P(ExtensionActiveTabTest, ActiveTabCors) { IN_PROC_BROWSER_TEST_F(ExtensionActiveTabTest, ActiveTabCors) {
ASSERT_TRUE(StartEmbeddedTestServer()); ASSERT_TRUE(StartEmbeddedTestServer());
ExtensionTestMessageListener background_page_ready("ready", ExtensionTestMessageListener background_page_ready("ready",
...@@ -209,13 +180,6 @@ IN_PROC_BROWSER_TEST_P(ExtensionActiveTabTest, ActiveTabCors) { ...@@ -209,13 +180,6 @@ IN_PROC_BROWSER_TEST_P(ExtensionActiveTabTest, ActiveTabCors) {
} }
} }
INSTANTIATE_TEST_SUITE_P(WithBlinkCors,
ExtensionActiveTabTest,
testing::Values(TestMode::kWithBlinkCors));
INSTANTIATE_TEST_SUITE_P(WithOutOfBlinkCors,
ExtensionActiveTabTest,
testing::Values(TestMode::kWithOutOfBlinkCors));
// Tests the behavior of activeTab and its relation to an extension's ability to // Tests the behavior of activeTab and its relation to an extension's ability to
// xhr file urls and inject scripts in file frames. // xhr file urls and inject scripts in file frames.
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FileURLs) { IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FileURLs) {
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/task/post_task.h" #include "base/task/post_task.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/extensions/extension_apitest.h" #include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_with_management_policy_apitest.h" #include "chrome/browser/extensions/extension_with_management_policy_apitest.h"
...@@ -36,7 +35,6 @@ ...@@ -36,7 +35,6 @@
#include "net/ssl/client_cert_store.h" #include "net/ssl/client_cert_store.h"
#include "net/ssl/ssl_server_config.h" #include "net/ssl/ssl_server_config.h"
#include "net/test/embedded_test_server/embedded_test_server.h" #include "net/test/embedded_test_server/embedded_test_server.h"
#include "services/network/public/cpp/features.h"
#include "url/gurl.h" #include "url/gurl.h"
namespace extensions { namespace extensions {
...@@ -45,11 +43,6 @@ namespace { ...@@ -45,11 +43,6 @@ namespace {
constexpr const char kWebstoreDomain[] = "cws.com"; constexpr const char kWebstoreDomain[] = "cws.com";
enum class TestMode {
kWithoutAny,
kWithOutOfBlinkCors,
};
std::unique_ptr<net::ClientCertStore> CreateNullCertStore() { std::unique_ptr<net::ClientCertStore> CreateNullCertStore() {
return nullptr; return nullptr;
} }
...@@ -122,28 +115,11 @@ IN_PROC_BROWSER_TEST_F(BackgroundXhrTest, HttpAuth) { ...@@ -122,28 +115,11 @@ IN_PROC_BROWSER_TEST_F(BackgroundXhrTest, HttpAuth) {
"test_http_auth.html", embedded_test_server()->GetURL("/auth-basic"))); "test_http_auth.html", embedded_test_server()->GetURL("/auth-basic")));
} }
class BackgroundXhrWebstoreTest : public ExtensionApiTestWithManagementPolicy, class BackgroundXhrWebstoreTest : public ExtensionApiTestWithManagementPolicy {
public testing::WithParamInterface<TestMode> {
public: public:
BackgroundXhrWebstoreTest() = default; BackgroundXhrWebstoreTest() = default;
~BackgroundXhrWebstoreTest() override = default; ~BackgroundXhrWebstoreTest() override = default;
void SetUp() override {
std::vector<base::Feature> enabled_features;
std::vector<base::Feature> disabled_features;
switch (GetParam()) {
case TestMode::kWithoutAny:
disabled_features.push_back(network::features::kOutOfBlinkCors);
break;
case TestMode::kWithOutOfBlinkCors:
enabled_features.push_back(network::features::kOutOfBlinkCors);
break;
}
scoped_feature_list_.InitWithFeatures(enabled_features, disabled_features);
ExtensionApiTestWithManagementPolicy::SetUp();
}
void SetUpCommandLine(base::CommandLine* command_line) override { void SetUpCommandLine(base::CommandLine* command_line) override {
ExtensionApiTest::SetUpCommandLine(command_line); ExtensionApiTest::SetUpCommandLine(command_line);
// TODO(devlin): For some reason, trying to fetch an HTTPS url in this test // TODO(devlin): For some reason, trying to fetch an HTTPS url in this test
...@@ -205,13 +181,12 @@ class BackgroundXhrWebstoreTest : public ExtensionApiTestWithManagementPolicy, ...@@ -205,13 +181,12 @@ class BackgroundXhrWebstoreTest : public ExtensionApiTestWithManagementPolicy,
} }
private: private:
base::test::ScopedFeatureList scoped_feature_list_;
DISALLOW_COPY_AND_ASSIGN(BackgroundXhrWebstoreTest); DISALLOW_COPY_AND_ASSIGN(BackgroundXhrWebstoreTest);
}; };
// Extensions should not be able to XHR to the webstore. // Extensions should not be able to XHR to the webstore.
IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, XHRToWebstore) { IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest, XHRToWebstore) {
const Extension* extension = LoadXhrExtension("<all_urls>"); const Extension* extension = LoadXhrExtension("<all_urls>");
GURL webstore_launch_url = extension_urls::GetWebstoreLaunchURL(); GURL webstore_launch_url = extension_urls::GetWebstoreLaunchURL();
...@@ -229,7 +204,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, XHRToWebstore) { ...@@ -229,7 +204,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, XHRToWebstore) {
} }
// Extensions should not be able to XHR to the webstore regardless of policy. // Extensions should not be able to XHR to the webstore regardless of policy.
IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, XHRToWebstorePolicy) { IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest, XHRToWebstorePolicy) {
{ {
ExtensionManagementPolicyUpdater pref(&policy_provider_); ExtensionManagementPolicyUpdater pref(&policy_provider_);
pref.AddPolicyAllowedHost( pref.AddPolicyAllowedHost(
...@@ -254,7 +229,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, XHRToWebstorePolicy) { ...@@ -254,7 +229,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, XHRToWebstorePolicy) {
// Extensions should not be able to bypass same-origin despite declaring // Extensions should not be able to bypass same-origin despite declaring
// <all_urls> for hosts restricted by enterprise policy. // <all_urls> for hosts restricted by enterprise policy.
IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyBlockedXHR) { IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest, PolicyBlockedXHR) {
{ {
ExtensionManagementPolicyUpdater pref(&policy_provider_); ExtensionManagementPolicyUpdater pref(&policy_provider_);
pref.AddPolicyBlockedHost("*", "*://*.example.com"); pref.AddPolicyBlockedHost("*", "*://*.example.com");
...@@ -277,7 +252,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyBlockedXHR) { ...@@ -277,7 +252,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyBlockedXHR) {
} }
// Verify that policy blocklists apply to XHRs done from injected scripts. // Verify that policy blocklists apply to XHRs done from injected scripts.
IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyContentScriptXHR) { IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest, PolicyContentScriptXHR) {
TestExtensionDir test_dir; TestExtensionDir test_dir;
test_dir.WriteManifest(R"( test_dir.WriteManifest(R"(
{ {
...@@ -339,7 +314,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyContentScriptXHR) { ...@@ -339,7 +314,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyContentScriptXHR) {
// Make sure the blocklist and allowlist update for both Default and Individual // Make sure the blocklist and allowlist update for both Default and Individual
// scope policies. Testing with all host permissions granted (<all_urls>). // scope policies. Testing with all host permissions granted (<all_urls>).
IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyUpdateXHR) { IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest, PolicyUpdateXHR) {
const Extension* extension = LoadXhrExtension("<all_urls>"); const Extension* extension = LoadXhrExtension("<all_urls>");
GURL example_url = GURL example_url =
...@@ -391,7 +366,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyUpdateXHR) { ...@@ -391,7 +366,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyUpdateXHR) {
// Make sure the allowlist entries added due to host permissions are removed // Make sure the allowlist entries added due to host permissions are removed
// when a more generic blocklist policy is updated and contains them. // when a more generic blocklist policy is updated and contains them.
// This tests the default policy scope update. // This tests the default policy scope update.
IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyUpdateDefaultXHR) { IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest, PolicyUpdateDefaultXHR) {
const Extension* extension = LoadXhrExtension("*://public.example.com/*"); const Extension* extension = LoadXhrExtension("*://public.example.com/*");
GURL example_url = GURL example_url =
...@@ -420,7 +395,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyUpdateDefaultXHR) { ...@@ -420,7 +395,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyUpdateDefaultXHR) {
// Make sure the allowlist entries added due to host permissions are removed // Make sure the allowlist entries added due to host permissions are removed
// when a more generic blocklist policy is updated and contains them. // when a more generic blocklist policy is updated and contains them.
// This tests an individual policy scope update. // This tests an individual policy scope update.
IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyUpdateIndividualXHR) { IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest, PolicyUpdateIndividualXHR) {
const Extension* extension = LoadXhrExtension("*://public.example.com/*"); const Extension* extension = LoadXhrExtension("*://public.example.com/*");
GURL example_url = GURL example_url =
...@@ -446,7 +421,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyUpdateIndividualXHR) { ...@@ -446,7 +421,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, PolicyUpdateIndividualXHR) {
ExecuteFetch(extension, public_example_url)); ExecuteFetch(extension, public_example_url));
} }
IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, XHRAnyPortPermission) { IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest, XHRAnyPortPermission) {
const Extension* extension = LoadXhrExtension("http://example.com:*/*"); const Extension* extension = LoadXhrExtension("http://example.com:*/*");
GURL permitted_url_to_fetch = GURL permitted_url_to_fetch =
...@@ -456,7 +431,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, XHRAnyPortPermission) { ...@@ -456,7 +431,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, XHRAnyPortPermission) {
::testing::HasSubstr("<head><title>OK</title></head>")); ::testing::HasSubstr("<head><title>OK</title></head>"));
} }
IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest,
XHRPortSpecificPermissionAllow) { XHRPortSpecificPermissionAllow) {
const Extension* extension = LoadXhrExtension( const Extension* extension = LoadXhrExtension(
"http://example.com:" + "http://example.com:" +
...@@ -469,7 +444,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, ...@@ -469,7 +444,7 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest,
::testing::HasSubstr("<head><title>OK</title></head>")); ::testing::HasSubstr("<head><title>OK</title></head>"));
} }
IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest,
XHRPortSpecificPermissionBlock) { XHRPortSpecificPermissionBlock) {
const Extension* extension = LoadXhrExtension( const Extension* extension = LoadXhrExtension(
"http://example.com:" + "http://example.com:" +
...@@ -482,11 +457,4 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest, ...@@ -482,11 +457,4 @@ IN_PROC_BROWSER_TEST_P(BackgroundXhrWebstoreTest,
ExecuteFetch(extension, not_permitted_url_to_fetch)); ExecuteFetch(extension, not_permitted_url_to_fetch));
} }
INSTANTIATE_TEST_SUITE_P(WithoutAny,
BackgroundXhrWebstoreTest,
testing::Values(TestMode::kWithoutAny));
INSTANTIATE_TEST_SUITE_P(WithOutOfBlinkCors,
BackgroundXhrWebstoreTest,
testing::Values(TestMode::kWithOutOfBlinkCors));
} // namespace extensions } // namespace extensions
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/in_process_browser_test.h"
...@@ -21,7 +20,6 @@ ...@@ -21,7 +20,6 @@
#include "content/public/test/browser_test_utils.h" #include "content/public/test/browser_test_utils.h"
#include "net/base/host_port_pair.h" #include "net/base/host_port_pair.h"
#include "net/dns/mock_host_resolver.h" #include "net/dns/mock_host_resolver.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/mojom/cors.mojom.h" #include "services/network/public/mojom/cors.mojom.h"
#include "services/network/public/mojom/cors_origin_pattern.mojom.h" #include "services/network/public/mojom/cors_origin_pattern.mojom.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -43,16 +41,8 @@ const char kTestSubdomainHost[] = "subdomain.crossorigin.example.com"; ...@@ -43,16 +41,8 @@ const char kTestSubdomainHost[] = "subdomain.crossorigin.example.com";
// Tests end to end functionality of CORS access origin allow lists. // Tests end to end functionality of CORS access origin allow lists.
class CorsOriginAccessListBrowserTest : public InProcessBrowserTest { class CorsOriginAccessListBrowserTest : public InProcessBrowserTest {
public:
CorsOriginAccessListBrowserTest() {
scoped_feature_list_.InitWithFeatures(
// Enabled features
{network::features::kOutOfBlinkCors},
// Disabled features
{});
}
protected: protected:
CorsOriginAccessListBrowserTest() = default;
std::unique_ptr<content::TitleWatcher> CreateWatcher() { std::unique_ptr<content::TitleWatcher> CreateWatcher() {
// Register all possible result strings here. // Register all possible result strings here.
std::unique_ptr<content::TitleWatcher> watcher = std::unique_ptr<content::TitleWatcher> watcher =
...@@ -141,8 +131,6 @@ class CorsOriginAccessListBrowserTest : public InProcessBrowserTest { ...@@ -141,8 +131,6 @@ class CorsOriginAccessListBrowserTest : public InProcessBrowserTest {
const base::string16 fail_string_ = base::ASCIIToUTF16("FAIL"); const base::string16 fail_string_ = base::ASCIIToUTF16("FAIL");
const base::string16 script_ = base::ASCIIToUTF16("reason"); const base::string16 script_ = base::ASCIIToUTF16("reason");
base::test::ScopedFeatureList scoped_feature_list_;
DISALLOW_COPY_AND_ASSIGN(CorsOriginAccessListBrowserTest); DISALLOW_COPY_AND_ASSIGN(CorsOriginAccessListBrowserTest);
}; };
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/synchronization/waitable_event.h" #include "base/synchronization/waitable_event.h"
#include "base/test/scoped_command_line.h" #include "base/test/scoped_command_line.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "content/public/browser/render_view_host.h" #include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
...@@ -31,7 +30,6 @@ ...@@ -31,7 +30,6 @@
#include "net/test/embedded_test_server/http_response.h" #include "net/test/embedded_test_server/http_response.h"
#include "net/test/embedded_test_server/request_handler_util.h" #include "net/test/embedded_test_server/request_handler_util.h"
#include "services/network/public/cpp/cors/cors.h" #include "services/network/public/cpp/cors/cors.h"
#include "services/network/public/cpp/features.h"
#include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h" #include "url/gurl.h"
...@@ -45,33 +43,13 @@ using net::test_server::BasicHttpResponse; ...@@ -45,33 +43,13 @@ using net::test_server::BasicHttpResponse;
using net::test_server::HttpRequest; using net::test_server::HttpRequest;
using net::test_server::HttpResponse; using net::test_server::HttpResponse;
enum class CorsTestMode {
kInBlink,
kInNetworkService,
};
// Tests end to end Origin header and CORS check behaviors without // Tests end to end Origin header and CORS check behaviors without
// --allow-file-access-from-files flag. // --allow-file-access-from-files flag.
class CorsFileOriginBrowserTest class CorsFileOriginBrowserTest : public ContentBrowserTest {
: public ContentBrowserTest,
public testing::WithParamInterface<CorsTestMode> {
public: public:
CorsFileOriginBrowserTest() CorsFileOriginBrowserTest()
: pass_string_(base::ASCIIToUTF16("PASS")), : pass_string_(base::ASCIIToUTF16("PASS")),
fail_string_(base::ASCIIToUTF16("FAIL")) { fail_string_(base::ASCIIToUTF16("FAIL")) {}
switch (GetParam()) {
case CorsTestMode::kInBlink:
scoped_feature_list_.InitWithFeatures(
{} /* enabled */,
{network::features::kOutOfBlinkCors} /* disabled */);
break;
case CorsTestMode::kInNetworkService:
scoped_feature_list_.InitWithFeatures(
{network::features::kOutOfBlinkCors} /* enabled */,
{} /*disabled */);
break;
}
}
~CorsFileOriginBrowserTest() override = default; ~CorsFileOriginBrowserTest() override = default;
protected: protected:
...@@ -193,9 +171,6 @@ class CorsFileOriginBrowserTest ...@@ -193,9 +171,6 @@ class CorsFileOriginBrowserTest
const base::string16 pass_string_; const base::string16 pass_string_;
const base::string16 fail_string_; const base::string16 fail_string_;
base::test::ScopedFeatureList scoped_command_line_;
base::test::ScopedFeatureList scoped_feature_list_;
DISALLOW_COPY_AND_ASSIGN(CorsFileOriginBrowserTest); DISALLOW_COPY_AND_ASSIGN(CorsFileOriginBrowserTest);
}; };
...@@ -216,7 +191,7 @@ class CorsFileOriginBrowserTestWithDisableWebSecurity ...@@ -216,7 +191,7 @@ class CorsFileOriginBrowserTestWithDisableWebSecurity
bool IsWebSecurityEnabled() const override { return false; } bool IsWebSecurityEnabled() const override { return false; }
}; };
IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest, IN_PROC_BROWSER_TEST_F(CorsFileOriginBrowserTest,
AccessControlAllowOriginIsNull) { AccessControlAllowOriginIsNull) {
std::unique_ptr<TitleWatcher> watcher = CreateWatcher(); std::unique_ptr<TitleWatcher> watcher = CreateWatcher();
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
...@@ -229,7 +204,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest, ...@@ -229,7 +204,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest,
EXPECT_TRUE(is_preflight_requested()); EXPECT_TRUE(is_preflight_requested());
} }
IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest, IN_PROC_BROWSER_TEST_F(CorsFileOriginBrowserTest,
AccessControlAllowOriginIsFile) { AccessControlAllowOriginIsFile) {
std::unique_ptr<TitleWatcher> watcher = CreateWatcher(); std::unique_ptr<TitleWatcher> watcher = CreateWatcher();
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
...@@ -242,7 +217,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest, ...@@ -242,7 +217,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest,
EXPECT_TRUE(is_preflight_requested()); EXPECT_TRUE(is_preflight_requested());
} }
IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest, AccessToSelfFileUrl) { IN_PROC_BROWSER_TEST_F(CorsFileOriginBrowserTest, AccessToSelfFileUrl) {
std::unique_ptr<TitleWatcher> watcher = CreateWatcher(); std::unique_ptr<TitleWatcher> watcher = CreateWatcher();
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
shell(), shell(),
...@@ -253,7 +228,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest, AccessToSelfFileUrl) { ...@@ -253,7 +228,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest, AccessToSelfFileUrl) {
EXPECT_EQ(fail_string(), watcher->WaitAndGetTitle()); EXPECT_EQ(fail_string(), watcher->WaitAndGetTitle());
} }
IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest, AccessToAnotherFileUrl) { IN_PROC_BROWSER_TEST_F(CorsFileOriginBrowserTest, AccessToAnotherFileUrl) {
std::unique_ptr<TitleWatcher> watcher = CreateWatcher(); std::unique_ptr<TitleWatcher> watcher = CreateWatcher();
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
shell(), shell(),
...@@ -271,7 +246,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest, AccessToAnotherFileUrl) { ...@@ -271,7 +246,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest, AccessToAnotherFileUrl) {
#else #else
#define MAYBE_UniversalAccessFromFileUrls UniversalAccessFromFileUrls #define MAYBE_UniversalAccessFromFileUrls UniversalAccessFromFileUrls
#endif #endif
IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest, IN_PROC_BROWSER_TEST_F(CorsFileOriginBrowserTest,
MAYBE_UniversalAccessFromFileUrls) { MAYBE_UniversalAccessFromFileUrls) {
const char* kScript = R"( const char* kScript = R"(
fetch($1) fetch($1)
...@@ -301,7 +276,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest, ...@@ -301,7 +276,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTest,
EXPECT_THAT(fetch_result, ::testing::HasSubstr("This page has a title")); EXPECT_THAT(fetch_result, ::testing::HasSubstr("This page has a title"));
} }
IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles, IN_PROC_BROWSER_TEST_F(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles,
AccessControlAllowOriginIsNull) { AccessControlAllowOriginIsNull) {
std::unique_ptr<TitleWatcher> watcher = CreateWatcher(); std::unique_ptr<TitleWatcher> watcher = CreateWatcher();
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
...@@ -314,7 +289,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles, ...@@ -314,7 +289,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles,
EXPECT_TRUE(is_preflight_requested()); EXPECT_TRUE(is_preflight_requested());
} }
IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles, IN_PROC_BROWSER_TEST_F(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles,
AccessControlAllowOriginIsFile) { AccessControlAllowOriginIsFile) {
std::unique_ptr<TitleWatcher> watcher = CreateWatcher(); std::unique_ptr<TitleWatcher> watcher = CreateWatcher();
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
...@@ -327,7 +302,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles, ...@@ -327,7 +302,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles,
EXPECT_TRUE(is_preflight_requested()); EXPECT_TRUE(is_preflight_requested());
} }
IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles, IN_PROC_BROWSER_TEST_F(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles,
AccessToSelfFileUrl) { AccessToSelfFileUrl) {
std::unique_ptr<TitleWatcher> watcher = CreateWatcher(); std::unique_ptr<TitleWatcher> watcher = CreateWatcher();
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
...@@ -339,7 +314,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles, ...@@ -339,7 +314,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles,
EXPECT_EQ(pass_string(), watcher->WaitAndGetTitle()); EXPECT_EQ(pass_string(), watcher->WaitAndGetTitle());
} }
IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles, IN_PROC_BROWSER_TEST_F(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles,
AccessToAnotherFileUrl) { AccessToAnotherFileUrl) {
std::unique_ptr<TitleWatcher> watcher = CreateWatcher(); std::unique_ptr<TitleWatcher> watcher = CreateWatcher();
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
...@@ -351,7 +326,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles, ...@@ -351,7 +326,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithAllowFileAccessFromFiles,
EXPECT_EQ(pass_string(), watcher->WaitAndGetTitle()); EXPECT_EQ(pass_string(), watcher->WaitAndGetTitle());
} }
IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithDisableWebSecurity, IN_PROC_BROWSER_TEST_F(CorsFileOriginBrowserTestWithDisableWebSecurity,
AccessControlAllowOriginIsNull) { AccessControlAllowOriginIsNull) {
std::unique_ptr<TitleWatcher> watcher = CreateWatcher(); std::unique_ptr<TitleWatcher> watcher = CreateWatcher();
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
...@@ -364,7 +339,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithDisableWebSecurity, ...@@ -364,7 +339,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithDisableWebSecurity,
EXPECT_FALSE(is_preflight_requested()); EXPECT_FALSE(is_preflight_requested());
} }
IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithDisableWebSecurity, IN_PROC_BROWSER_TEST_F(CorsFileOriginBrowserTestWithDisableWebSecurity,
AccessControlAllowOriginIsFile) { AccessControlAllowOriginIsFile) {
std::unique_ptr<TitleWatcher> watcher = CreateWatcher(); std::unique_ptr<TitleWatcher> watcher = CreateWatcher();
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
...@@ -377,7 +352,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithDisableWebSecurity, ...@@ -377,7 +352,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithDisableWebSecurity,
EXPECT_FALSE(is_preflight_requested()); EXPECT_FALSE(is_preflight_requested());
} }
IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithDisableWebSecurity, IN_PROC_BROWSER_TEST_F(CorsFileOriginBrowserTestWithDisableWebSecurity,
AccessToSelfFileUrl) { AccessToSelfFileUrl) {
std::unique_ptr<TitleWatcher> watcher = CreateWatcher(); std::unique_ptr<TitleWatcher> watcher = CreateWatcher();
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
...@@ -389,7 +364,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithDisableWebSecurity, ...@@ -389,7 +364,7 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithDisableWebSecurity,
EXPECT_EQ(pass_string(), watcher->WaitAndGetTitle()); EXPECT_EQ(pass_string(), watcher->WaitAndGetTitle());
} }
IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithDisableWebSecurity, IN_PROC_BROWSER_TEST_F(CorsFileOriginBrowserTestWithDisableWebSecurity,
AccessToAnotherFileUrl) { AccessToAnotherFileUrl) {
std::unique_ptr<TitleWatcher> watcher = CreateWatcher(); std::unique_ptr<TitleWatcher> watcher = CreateWatcher();
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
...@@ -401,24 +376,6 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithDisableWebSecurity, ...@@ -401,24 +376,6 @@ IN_PROC_BROWSER_TEST_P(CorsFileOriginBrowserTestWithDisableWebSecurity,
EXPECT_EQ(pass_string(), watcher->WaitAndGetTitle()); EXPECT_EQ(pass_string(), watcher->WaitAndGetTitle());
} }
INSTANTIATE_TEST_SUITE_P(
/* No test prefix */,
CorsFileOriginBrowserTest,
::testing::Values(CorsTestMode::kInBlink,
CorsTestMode::kInNetworkService));
INSTANTIATE_TEST_SUITE_P(
/* No test prefix */,
CorsFileOriginBrowserTestWithAllowFileAccessFromFiles,
::testing::Values(CorsTestMode::kInBlink,
CorsTestMode::kInNetworkService));
INSTANTIATE_TEST_SUITE_P(
/* No test prefix */,
CorsFileOriginBrowserTestWithDisableWebSecurity,
::testing::Values(CorsTestMode::kInBlink,
CorsTestMode::kInNetworkService));
} // namespace } // namespace
} // namespace content } // namespace content
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
#include "base/test/scoped_feature_list.h"
#include "base/thread_annotations.h" #include "base/thread_annotations.h"
#include "content/public/test/browser_test_utils.h" #include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h" #include "content/public/test/content_browser_test.h"
...@@ -34,10 +33,7 @@ const base::string16 kTestDone = base::string16(base::ASCIIToUTF16("DONE")); ...@@ -34,10 +33,7 @@ const base::string16 kTestDone = base::string16(base::ASCIIToUTF16("DONE"));
// Tests end to end behaviors on CORS preflight and its cache. // Tests end to end behaviors on CORS preflight and its cache.
class CorsPreflightCacheBrowserTest : public ContentBrowserTest { class CorsPreflightCacheBrowserTest : public ContentBrowserTest {
protected: protected:
CorsPreflightCacheBrowserTest() { CorsPreflightCacheBrowserTest() = default;
scoped_feature_list_.InitWithFeatures({network::features::kOutOfBlinkCors},
{});
}
~CorsPreflightCacheBrowserTest() override = default; ~CorsPreflightCacheBrowserTest() override = default;
void SetUpOnMainThread() override { void SetUpOnMainThread() override {
...@@ -84,7 +80,6 @@ class CorsPreflightCacheBrowserTest : public ContentBrowserTest { ...@@ -84,7 +80,6 @@ class CorsPreflightCacheBrowserTest : public ContentBrowserTest {
return response; return response;
} }
base::test::ScopedFeatureList scoped_feature_list_;
net::EmbeddedTestServer cross_origin_test_server_; net::EmbeddedTestServer cross_origin_test_server_;
base::Lock lock_; base::Lock lock_;
...@@ -104,6 +99,7 @@ IN_PROC_BROWSER_TEST_F(CorsPreflightCacheBrowserTest, Default) { ...@@ -104,6 +99,7 @@ IN_PROC_BROWSER_TEST_F(CorsPreflightCacheBrowserTest, Default) {
EXPECT_EQ(1u, options_count()); EXPECT_EQ(1u, options_count());
EXPECT_EQ(1u, get_count()); EXPECT_EQ(1u, get_count());
// Make another fetch request, and OPTIONS request hits the preflight cache.
std::unique_ptr<TitleWatcher> watcher2 = std::unique_ptr<TitleWatcher> watcher2 =
std::make_unique<TitleWatcher>(shell()->web_contents(), kTestDone); std::make_unique<TitleWatcher>(shell()->web_contents(), kTestDone);
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
...@@ -113,13 +109,16 @@ IN_PROC_BROWSER_TEST_F(CorsPreflightCacheBrowserTest, Default) { ...@@ -113,13 +109,16 @@ IN_PROC_BROWSER_TEST_F(CorsPreflightCacheBrowserTest, Default) {
EXPECT_EQ(1u, options_count()); EXPECT_EQ(1u, options_count());
EXPECT_EQ(2u, get_count()); EXPECT_EQ(2u, get_count());
// Make another fetch request with reload cache mode, and it should not hit
// the preflight cache. Only OOR-CORS mode take the cache mode count in.
std::unique_ptr<TitleWatcher> watcher3 = std::unique_ptr<TitleWatcher> watcher3 =
std::make_unique<TitleWatcher>(shell()->web_contents(), kTestDone); std::make_unique<TitleWatcher>(shell()->web_contents(), kTestDone);
EXPECT_TRUE(NavigateToURL( EXPECT_TRUE(NavigateToURL(
shell(), embedded_test_server()->GetURL(base::StringPrintf( shell(), embedded_test_server()->GetURL(base::StringPrintf(
"%s?;%d;reload", kTestPath, cross_origin_port())))); "%s?;%d;reload", kTestPath, cross_origin_port()))));
EXPECT_EQ(kTestDone, watcher3->WaitAndGetTitle()); EXPECT_EQ(kTestDone, watcher3->WaitAndGetTitle());
EXPECT_EQ(2u, options_count()); EXPECT_EQ(network::features::ShouldEnableOutOfBlinkCors() ? 2u : 1u,
options_count());
EXPECT_EQ(3u, get_count()); EXPECT_EQ(3u, get_count());
} }
......
...@@ -506,8 +506,7 @@ class CrossSiteDocumentBlockingTestBase : public ContentBrowserTest { ...@@ -506,8 +506,7 @@ class CrossSiteDocumentBlockingTestBase : public ContentBrowserTest {
}; };
enum class TestMode { enum class TestMode {
kWithoutOutOfBlinkCors, kWithCORBProtectionSniffing,
kWithOutOfBlinkCors,
kWithoutCORBProtectionSniffing, kWithoutCORBProtectionSniffing,
}; };
class CrossSiteDocumentBlockingTest class CrossSiteDocumentBlockingTest
...@@ -516,17 +515,14 @@ class CrossSiteDocumentBlockingTest ...@@ -516,17 +515,14 @@ class CrossSiteDocumentBlockingTest
public: public:
CrossSiteDocumentBlockingTest() { CrossSiteDocumentBlockingTest() {
switch (GetParam()) { switch (GetParam()) {
case TestMode::kWithoutOutOfBlinkCors: case TestMode::kWithCORBProtectionSniffing:
scoped_feature_list_.InitAndDisableFeature(
network::features::kOutOfBlinkCors);
break;
case TestMode::kWithOutOfBlinkCors:
scoped_feature_list_.InitAndEnableFeature( scoped_feature_list_.InitAndEnableFeature(
network::features::kOutOfBlinkCors); network::features::kCORBProtectionSniffing);
break; break;
case TestMode::kWithoutCORBProtectionSniffing: case TestMode::kWithoutCORBProtectionSniffing:
scoped_feature_list_.InitAndDisableFeature( scoped_feature_list_.InitAndDisableFeature(
network::features::kCORBProtectionSniffing); network::features::kCORBProtectionSniffing);
break;
} }
} }
~CrossSiteDocumentBlockingTest() override = default; ~CrossSiteDocumentBlockingTest() override = default;
...@@ -1479,13 +1475,10 @@ IN_PROC_BROWSER_TEST_P(CrossSiteDocumentBlockingTest, ...@@ -1479,13 +1475,10 @@ IN_PROC_BROWSER_TEST_P(CrossSiteDocumentBlockingTest,
} }
} }
INSTANTIATE_TEST_SUITE_P(WithoutOutOfBlinkCors, INSTANTIATE_TEST_SUITE_P(
CrossSiteDocumentBlockingTest, WithCORBProtectionSniffing,
::testing::Values(TestMode::kWithoutOutOfBlinkCors)); CrossSiteDocumentBlockingTest,
::testing::Values(TestMode::kWithCORBProtectionSniffing));
INSTANTIATE_TEST_SUITE_P(WithOutOfBlinkCors,
CrossSiteDocumentBlockingTest,
::testing::Values(TestMode::kWithOutOfBlinkCors));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(
WithoutCORBProtectionSniffing, WithoutCORBProtectionSniffing,
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "mojo/public/c/system/data_pipe.h" #include "mojo/public/c/system/data_pipe.h"
#include "services/network/public/mojom/fetch_api.mojom-blink.h" #include "services/network/public/mojom/fetch_api.mojom-blink.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/web_runtime_features.h"
#include "third_party/blink/public/platform/web_url_loader.h" #include "third_party/blink/public/platform/web_url_loader.h"
#include "third_party/blink/public/platform/web_url_loader_factory.h" #include "third_party/blink/public/platform/web_url_loader_factory.h"
#include "third_party/blink/renderer/platform/exported/wrapped_resource_response.h" #include "third_party/blink/renderer/platform/exported/wrapped_resource_response.h"
...@@ -117,9 +116,6 @@ std::ostream& operator<<(std::ostream& o, const ResourceLoaderTest::From& f) { ...@@ -117,9 +116,6 @@ std::ostream& operator<<(std::ostream& o, const ResourceLoaderTest::From& f) {
} }
TEST_F(ResourceLoaderTest, ResponseType) { TEST_F(ResourceLoaderTest, ResponseType) {
// This test will be trivial if EnableOutOfBlinkCors is enabled.
WebRuntimeFeatures::EnableOutOfBlinkCors(false);
const scoped_refptr<const SecurityOrigin> origin = const scoped_refptr<const SecurityOrigin> origin =
SecurityOrigin::Create(foo_url_); SecurityOrigin::Create(foo_url_);
const scoped_refptr<const SecurityOrigin> no_origin = nullptr; const scoped_refptr<const SecurityOrigin> no_origin = nullptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment