#include "services/network/public/cpp/cors/origin_access_list.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/cors.mojom.h"
#include "services/network/public/mojom/cors_origin_pattern.mojom.h"
#include <memory>
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace network::cors {
namespace {
const auto kAllowSubdomains = …;
const auto kDisallowSubdomains = …;
const auto kAllowAnyPort = …;
const auto kAllowOnlySpecifiedPort = …;
constexpr uint16_t kHttpsPort = …;
constexpr uint16_t kAnyPort = …;
class OriginAccessListTest : public testing::Test { … };
TEST_F(OriginAccessListTest, IsAccessAllowedWithPort) { … }
TEST_F(OriginAccessListTest, IsAccessAllowedForIsolatedWorldOrigin) { … }
TEST_F(OriginAccessListTest, IsAccessAllowed) { … }
TEST_F(OriginAccessListTest, IsAccessAllowedWildCard) { … }
TEST_F(OriginAccessListTest, IsAccessAllowedWithBlockListEntry) { … }
TEST_F(OriginAccessListTest, IsAccessAllowedWildcardWithBlockListEntry) { … }
TEST_F(OriginAccessListTest, IsPriorityRespected) { … }
TEST_F(OriginAccessListTest, BlockWhenAllowAndBlockHaveSamePriority) { … }
TEST_F(OriginAccessListTest, IsPriorityRespectedReverse) { … }
TEST_F(OriginAccessListTest, CreateCorsOriginAccessPatternsList) { … }
}
}