#include "third_party/blink/renderer/platform/weborigin/security_policy.h"
#include "base/test/scoped_command_line.h"
#include "base/test/scoped_feature_list.h"
#include "services/network/public/cpp/is_potentially_trustworthy.h"
#include "services/network/public/cpp/network_switches.h"
#include "services/network/public/mojom/cors.mojom-blink.h"
#include "services/network/public/mojom/cors_origin_pattern.mojom-blink.h"
#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/loader/referrer_utils.h"
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
#include "third_party/blink/renderer/platform/weborigin/scheme_registry.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include "url/url_canon.h"
#include "url/url_util.h"
namespace blink {
TEST(SecurityPolicyTest, EmptyReferrerForUnauthorizedScheme) { … }
TEST(SecurityPolicyTest, GenerateReferrerRespectsReferrerSchemesRegistry) { … }
TEST(SecurityPolicyTest, ShouldHideReferrerRespectsReferrerSchemesRegistry) { … }
TEST(SecurityPolicyTest, GenerateReferrer) { … }
TEST(SecurityPolicyTest, GenerateReferrerTruncatesLongUrl) { … }
TEST(SecurityPolicyTest, ReferrerPolicyFromHeaderValue) { … }
TEST(SecurityPolicyTest, TrustworthySafelist) { … }
TEST(SecurityPolicyTest, ReferrerPolicyToAndFromString) { … }
class SecurityPolicyAccessTest : public testing::Test { … };
TEST_F(SecurityPolicyAccessTest, IsOriginAccessAllowed) { … }
TEST_F(SecurityPolicyAccessTest, IsOriginAccessAllowedWildCard) { … }
TEST_F(SecurityPolicyAccessTest, IsOriginAccessAllowedWithBlockListEntry) { … }
TEST_F(SecurityPolicyAccessTest,
IsOriginAccessAllowedWildcardWithBlockListEntry) { … }
TEST_F(SecurityPolicyAccessTest, ClearOriginAccessListForOrigin) { … }
TEST_F(SecurityPolicyAccessTest, IsOriginAccessAllowedPriority) { … }
TEST(SecurityPolicyTest, ReferrerForCustomScheme) { … }
}