#include "base/containers/contains.h"
#include "base/strings/escape.h"
#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "content/public/browser/network_service_util.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/fenced_frame_test_util.h"
#include "content/public/test/url_loader_monitor.h"
#include "content/shell/browser/shell.h"
#include "content/shell/browser/shell_content_browser_client.h"
#include "net/dns/mock_host_resolver.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "services/network/public/mojom/trust_tokens.mojom.h"
#include "services/network/public/mojom/url_loader.mojom-shared.h"
#include "services/network/test/trust_token_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
namespace content {
class TrustTokenParametersBrowsertest
: public ::testing::WithParamInterface<network::TrustTokenTestParameters>,
public ContentBrowserTest { … };
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(TrustTokenParametersBrowsertest,
PopulatesResourceRequestViaFetch) { … }
IN_PROC_BROWSER_TEST_P(TrustTokenParametersBrowsertest,
PopulatesResourceRequestViaIframe) { … }
IN_PROC_BROWSER_TEST_P(TrustTokenParametersBrowsertest,
PopulatesResourceRequestViaXhr) { … }
class TrustTokenPermissionsPolicyBrowsertest : public ContentBrowserTest { … };
IN_PROC_BROWSER_TEST_F(TrustTokenPermissionsPolicyBrowsertest,
PassesNegativeValueToFactoryParams) { … }
IN_PROC_BROWSER_TEST_F(TrustTokenPermissionsPolicyBrowsertest,
PassesPositiveValueToFactoryParams) { … }
IN_PROC_BROWSER_TEST_F(TrustTokenPermissionsPolicyBrowsertest,
PassesPositiveIssuanceValueToFactoryParams) { … }
IN_PROC_BROWSER_TEST_F(TrustTokenPermissionsPolicyBrowsertest,
PassesNegativeValueToFactoryParamsAfterCrash) { … }
IN_PROC_BROWSER_TEST_F(TrustTokenPermissionsPolicyBrowsertest,
PassesPositiveValueToFactoryParamsAfterCrash) { … }
IN_PROC_BROWSER_TEST_F(TrustTokenPermissionsPolicyBrowsertest,
PassesPositiveIssuanceValueToFactoryParamsAfterCrash) { … }
constexpr char kPrivateStateTokenRedemptionPolicyHeader[] = …;
constexpr char kPrivateStateTokenIssuancePolicyHeader[] = …;
class TrustTokenPermissionsPolicyFencedFrameTest
: public TrustTokenPermissionsPolicyBrowsertest,
public ::testing::WithParamInterface<std::tuple<bool, bool>> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(TrustTokenPermissionsPolicyFencedFrameTest,
PassesNegativeRedemptionValueToFactoryParams) { … }
IN_PROC_BROWSER_TEST_P(TrustTokenPermissionsPolicyFencedFrameTest,
PassesNegativeIssuanceValueToFactoryParams) { … }
}