#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include <stdint.h>
#include <string_view>
#include "base/test/scoped_command_line.h"
#include "base/unguessable_token.h"
#include "net/base/url_util.h"
#include "services/network/public/cpp/is_potentially_trustworthy_unittest.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 "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/blob/blob_url.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 "third_party/blink/renderer/platform/weborigin/security_policy.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
#include "third_party/blink/renderer/platform/wtf/text/string_operators.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "url/gurl.h"
#include "url/origin_abstract_tests.h"
#include "url/url_util.h"
namespace blink {
const uint16_t kMaxAllowedPort = …;
class SecurityOriginTest : public testing::Test { … };
TEST_F(SecurityOriginTest, ValidPortsCreateTupleOrigins) { … }
TEST_F(SecurityOriginTest, LocalAccess) { … }
TEST_F(SecurityOriginTest, IsNullURLSecure) { … }
TEST_F(SecurityOriginTest, CanAccess) { … }
TEST_F(SecurityOriginTest, CanAccessDetail) { … }
TEST_F(SecurityOriginTest, CanRequest) { … }
TEST_F(SecurityOriginTest, CanRequestWithAllowListedAccess) { … }
TEST_F(SecurityOriginTest, CannotRequestWithBlockListedAccess) { … }
TEST_F(SecurityOriginTest, CanRequestWithMoreSpecificAllowList) { … }
TEST_F(SecurityOriginTest, CanRequestWithPortSpecificAllowList) { … }
TEST_F(SecurityOriginTest, PunycodeNotUnicode) { … }
TEST_F(SecurityOriginTest, CreateFromTuple) { … }
TEST_F(SecurityOriginTest, OpaquenessPropagatesToBlobUrls) { … }
TEST_F(SecurityOriginTest, OpaqueOriginIsSameOriginWith) { … }
TEST_F(SecurityOriginTest, CanonicalizeHost) { … }
TEST_F(SecurityOriginTest, UrlOriginConversions) { … }
TEST_F(SecurityOriginTest, InvalidWrappedUrls) { … }
TEST_F(SecurityOriginTest, EffectiveDomain) { … }
TEST_F(SecurityOriginTest, EffectiveDomainSetFromDom) { … }
TEST_F(SecurityOriginTest, ToTokenForFastCheck) { … }
TEST_F(SecurityOriginTest, OpaqueIsolatedCopy) { … }
TEST_F(SecurityOriginTest, EdgeCases) { … }
TEST_F(SecurityOriginTest, RegistrableDomain) { … }
TEST_F(SecurityOriginTest, IsSameOriginWith) { … }
TEST_F(SecurityOriginTest, IsSameOriginWithWithLocalScheme) { … }
TEST_F(SecurityOriginTest, IsSameOriginDomainWith) { … }
TEST_F(SecurityOriginTest, IsSameOriginDomainWithWithLocalScheme) { … }
TEST_F(SecurityOriginTest, IsSameSiteWith) { … }
TEST_F(SecurityOriginTest, IsSameSiteWithWithLocalScheme) { … }
TEST_F(SecurityOriginTest, PercentEncodesHost) { … }
TEST_F(SecurityOriginTest, NewOpaqueOriginLazyInitsNonce) { … }
}
namespace url {
class BlinkSecurityOriginTestTraits { … };
INSTANTIATE_TYPED_TEST_SUITE_P(…);
}
namespace network {
namespace test {
INSTANTIATE_TYPED_TEST_SUITE_P(…);
}
}