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

OOR-CORS: CorsOriginAccessListBrowserTest expects kOutOfBlinkCors

This patch partially reverts the change introduced by
https://chromium-review.googlesource.com/c/chromium/src/+/1792682

Bug: 1000554, 1003271
Change-Id: Iccf7dab5d8c5f919f1b42c5064b061854c7a6699
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1800704
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Auto-Submit: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695989}
parent e8e83f3c
......@@ -12,6 +12,7 @@
#include "base/strings/string16.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
......@@ -20,6 +21,7 @@
#include "content/public/test/browser_test_utils.h"
#include "net/base/host_port_pair.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_origin_pattern.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
......@@ -42,7 +44,11 @@ const char kTestSubdomainHost[] = "subdomain.crossorigin.example.com";
// Tests end to end functionality of CORS access origin allow lists.
class CorsOriginAccessListBrowserTest : public InProcessBrowserTest {
protected:
CorsOriginAccessListBrowserTest() = default;
CorsOriginAccessListBrowserTest() {
// This test verifies if the CorsOriginAccessList works with OOR-CORS.
scoped_feature_list_.InitAndEnableFeature(
network::features::kOutOfBlinkCors);
}
std::unique_ptr<content::TitleWatcher> CreateWatcher() {
// Register all possible result strings here.
std::unique_ptr<content::TitleWatcher> watcher =
......@@ -131,6 +137,8 @@ class CorsOriginAccessListBrowserTest : public InProcessBrowserTest {
const base::string16 fail_string_ = base::ASCIIToUTF16("FAIL");
const base::string16 script_ = base::ASCIIToUTF16("reason");
base::test::ScopedFeatureList scoped_feature_list_;
DISALLOW_COPY_AND_ASSIGN(CorsOriginAccessListBrowserTest);
};
......
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