#include "third_party/blink/public/common/storage_key/storage_key.h"
#include <optional>
#include <string_view>
#include <utility>
#include "base/feature_list.h"
#include "base/test/gtest_util.h"
#include "base/test/scoped_feature_list.h"
#include "base/unguessable_token.h"
#include "net/base/features.h"
#include "net/base/schemeful_site.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/storage_key/ancestor_chain_bit.mojom.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace blink {
namespace {
bool IsOpaque(const StorageKey& key) { … }
}
class StorageKeyTest : public ::testing::Test { … };
TEST_F(StorageKeyTest, ConstructionValidity) { … }
TEST_F(StorageKeyTest, EquivalenceUnpartitioned) { … }
TEST_F(StorageKeyTest, EquivalencePartitioned) { … }
TEST_F(StorageKeyTest, SerializeFirstParty) { … }
TEST_F(StorageKeyTest, SerializeFirstPartyForLocalStorage) { … }
TEST_F(StorageKeyTest, SerializePartitioned) { … }
TEST_F(StorageKeyTest, SerializeNonce) { … }
TEST_F(StorageKeyTest, Deserialize) { … }
TEST_F(StorageKeyTest, CreateFromStringForTesting) { … }
TEST_F(StorageKeyTest, SerializeDeserialize) { … }
TEST_F(StorageKeyTest, SerializeDeserializePartitioned) { … }
TEST_F(StorageKeyTest, SerializeDeserializeNonce) { … }
TEST_F(StorageKeyTest, SerializeDeserializeOpaqueTopLevelSite) { … }
TEST_F(StorageKeyTest, DeserializeNonces) { … }
TEST_F(StorageKeyTest, DeserializeAncestorChainBits) { … }
TEST_F(StorageKeyTest, IsThirdPartyStoragePartitioningEnabled) { … }
TEST_F(StorageKeyTest, TopLevelSiteGetterWithPartitioningDisabled) { … }
TEST_F(StorageKeyTest, TopLevelSiteGetterWithPartitioningEnabled) { … }
TEST_F(StorageKeyTest, AncestorChainBitGetterWithPartitioningDisabled) { … }
TEST_F(StorageKeyTest, AncestorChainBitGetterWithPartitioningEnabled) { … }
TEST_F(StorageKeyTest, IsThirdPartyContext) { … }
TEST_F(StorageKeyTest, ToNetSiteForCookies) { … }
TEST_F(StorageKeyTest, ToPartialNetIsolationInfo) { … }
TEST_F(StorageKeyTest, CopyWithForceEnabledThirdPartyStoragePartitioning) { … }
TEST_F(StorageKeyTest, ToCookiePartitionKeyAncestorChainBitDisabled) { … }
TEST_F(StorageKeyTest, ToCookiePartitionKeyAncestorChainEnabled) { … }
TEST_F(StorageKeyTest, NonceRequiresMatchingOriginSiteAndCrossSite) { … }
TEST_F(StorageKeyTest, OpaqueTopLevelSiteRequiresCrossSite) { … }
TEST_F(StorageKeyTest, ShouldSkipKeyDueToPartitioning) { … }
TEST_F(StorageKeyTest, OriginAndSiteMismatchRequiresCrossSite) { … }
TEST_F(StorageKeyTest, WithOrigin) { … }
TEST_F(StorageKeyTest, FromWireReturnValue) { … }
TEST_F(StorageKeyTest, CreateFromOriginAndIsolationInfo) { … }
TEST_F(StorageKeyTest, MalformedOriginsAndSchemefulSites) { … }
TEST_F(StorageKeyTest, DeserializeForLocalStorageFirstParty) { … }
TEST_F(StorageKeyTest,
SerializeDeserializeWithAndWithoutThirdPartyStoragePartitioning) { … }
}