chromium/net/base/isolation_info_unittest.cc

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

#include "net/base/isolation_info.h"

#include <iostream>
#include <optional>

#include "base/strings/strcat.h"
#include "base/test/gtest_util.h"
#include "base/test/scoped_feature_list.h"
#include "base/unguessable_token.h"
#include "isolation_info.h"
#include "net/base/features.h"
#include "net/base/network_anonymization_key.h"
#include "net/base/network_isolation_key.h"
#include "net/base/schemeful_site.h"
#include "net/cookies/site_for_cookies.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"
#include "url/url_util.h"

namespace net {

namespace {

class IsolationInfoTest : public testing::Test {};

void DuplicateAndCompare(const IsolationInfo& isolation_info) {}

TEST_F(IsolationInfoTest, DebugString) {}

TEST_F(IsolationInfoTest, RequestTypeMainFrame) {}

TEST_F(IsolationInfoTest, RequestTypeSubFrame) {}

TEST_F(IsolationInfoTest, RequestTypeMainFrameWithNonce) {}

TEST_F(IsolationInfoTest, RequestTypeSubFrameWithNonce) {}

TEST_F(IsolationInfoTest, RequestTypeOther) {}

TEST_F(IsolationInfoTest, RequestTypeOtherWithSiteForCookies) {}

// Test case of a subresource for cross-site subframe (which has an empty
// site-for-cookies).
TEST_F(IsolationInfoTest, RequestTypeOtherWithEmptySiteForCookies) {}

TEST_F(IsolationInfoTest, CreateTransient) {}

TEST_F(IsolationInfoTest, CreateTransientWithNonce) {}

TEST_F(IsolationInfoTest, CreateForInternalRequest) {}

// Test that in the UpdateNothing case, the SiteForCookies does not have to
// match the frame origin, unlike in the HTTP/HTTPS case.
TEST_F(IsolationInfoTest, CustomSchemeRequestTypeOther) {}

// Success cases are covered by other tests, so only need a separate test to
// cover the failure cases.
TEST_F(IsolationInfoTest, CreateIfConsistentFails) {}

TEST_F(IsolationInfoTest, Serialization) {}

}  // namespace

}  // namespace net