chromium/third_party/blink/renderer/platform/storage/blink_storage_key_test.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/platform/storage/blink_storage_key.h"

#include "base/memory/scoped_refptr.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 "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/network/blink_schemeful_site.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include "url/gurl.h"

namespace blink {

TEST(BlinkStorageKeyTest, OpaqueOriginsDistinct) {}

TEST(BlinkStorageKeyTest, EqualityWithNonce) {}

TEST(BlinkStorageKeyTest, OpaqueOriginRetained) {}

TEST(BlinkStorageKeyTest, CreateFromNonOpaqueOrigin) {}

// Tests that the conversion BlinkStorageKey -> StorageKey -> BlinkStorageKey is
// the identity.
TEST(BlinkStorageKeyTest, BlinkStorageKeyRoundTripConversion) {}

// Tests that the conversion StorageKey -> BlinkStorageKey -> StorageKey is the
// identity.
TEST(BlinkStorageKeyTest, StorageKeyRoundTripConversion) {}

// Test that string -> StorageKey test function performs as expected.
TEST(BlinkStorageKeyTest, CreateFromStringForTesting) {}

// Test that BlinkStorageKey's top_level_site getter returns origin's site when
// storage partitioning is disabled.
TEST(BlinkStorageKeyTest, TopLevelSiteGetterWithPartitioningDisabled) {}

// Test that BlinkStorageKey's top_level_site getter returns the top level site
// when storage partitioning is enabled.
TEST(BlinkStorageKeyTest, TopLevelSiteGetterWithPartitioningEnabled) {}

TEST(BlinkStorageKeyTest, CopyWithForceEnabledThirdPartyStoragePartitioning) {}

TEST(BlinkStorageKeyTest, NonceRequiresMatchingOriginSiteAndCrossSite) {}

TEST(BlinkStorageKeyTest, OpaqueTopLevelSiteRequiresCrossSite) {}

TEST(BlinkStorageKeyTest, OriginAndSiteMismatchRequiresCrossSite) {}

// Tests that FromWire() returns true/false correctly.
// If you make a change here, you should probably make it in StorageKeyTest too.
TEST(BlinkStorageKeyTest, FromWireReturnValue) {}

TEST(BlinkStorageKeyTest, WithOrigin) {}
}  // namespace blink