#include "content/browser/renderer_host/private_network_access_util.h"
#include <array>
#include <ostream>
#include <string_view>
#include <tuple>
#include <vector>
#include "base/command_line.h"
#include "base/test/scoped_feature_list.h"
#include "content/common/features.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "services/network/public/mojom/client_security_state.mojom.h"
#include "services/network/public/mojom/ip_address_space.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
namespace {
AddressSpace;
RequestContext;
Policy;
ElementsAreArray;
constexpr bool kNonSecure = …;
constexpr bool kSecure = …;
struct DerivePolicyInput { … };
std::string_view RequestContextToStringPiece(RequestContext request_context) { … }
std::ostream& operator<<(std::ostream& out, const DerivePolicyInput& input) { … }
Policy DerivePolicy(DerivePolicyInput input) { … }
std::map<DerivePolicyInput, Policy> DefaultPolicyMap() { … }
std::map<DerivePolicyInput, Policy> AllAllowMap() { … }
void TestPolicyMap(const std::map<DerivePolicyInput, Policy>& expected) { … }
TEST(PrivateNetworkAccessUtilTest, DerivePolicy) { … }
TEST(PrivateNetworkAccessUtilTest, DerivePolicyBlockFromInsecurePrivate) { … }
TEST(PrivateNetworkAccessUtilTest, DerivePolicyBlockFromInsecureUnknown) { … }
TEST(PrivateNetworkAccessUtilTest, DerivePolicyNoPreflights) { … }
TEST(PrivateNetworkAccessUtilTest, DerivePolicyRespectPreflightResults) { … }
TEST(PrivateNetworkAccessUtilTest, DerivePolicyWorkers) { … }
TEST(PrivateNetworkAccessUtilTest, DerivePolicyWorkersWithPreflights) { … }
TEST(PrivateNetworkAccessUtilTest, DerivePolicyDisableWebSecurity) { … }
TEST(PrivateNetworkAccessUtilTest, DerivePolicyIframesWarningOnly) { … }
TEST(PrivateNetworkAccessUtilTest,
DerivePolicyIframesWarningOnlyWithPreflights) { … }
TEST(PrivateNetworkAccessUtilTest, DerivePolicyIframes) { … }
TEST(PrivateNetworkAccessUtilTest, DerivePolicyIframesWithPreflights) { … }
}
}