#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/permissions_policy/policy_disposition.mojom-blink.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/permissions_policy/policy_helper.h"
#include "third_party/blink/renderer/core/testing/sim/sim_request.h"
#include "third_party/blink/renderer/core/testing/sim/sim_test.h"
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/url_test_helpers.h"
namespace blink {
class DocumentPolicySimTest : public SimTest { … };
TEST_F(DocumentPolicySimTest, DocumentPolicyNegotiationNoEffectWhenFlagNotSet) { … }
TEST_F(DocumentPolicySimTest, ReportDocumentPolicyHeaderParsingError) { … }
TEST_F(DocumentPolicySimTest, ReportRequireDocumentPolicyHeaderParsingError) { … }
TEST_F(DocumentPolicySimTest, ReportErrorWhenDocumentPolicyIncompatible) { … }
TEST_F(DocumentPolicySimTest,
RequireDocumentPolicyHeaderShouldNotAffectCurrentDocument) { … }
TEST_F(DocumentPolicySimTest, DocumentPolicyHeaderHistogramTest) { … }
TEST_F(DocumentPolicySimTest, DocumentPolicyPolicyAttributeHistogramTest) { … }
TEST_F(DocumentPolicySimTest, DocumentPolicyEnforcedReportHistogramTest) { … }
TEST_F(DocumentPolicySimTest, DocumentPolicyReportOnlyReportHistogramTest) { … }
class DocumentPolicyHeaderUseCounterTest
: public DocumentPolicySimTest,
public testing::WithParamInterface<std::tuple<bool, bool, bool>> { … };
TEST_P(DocumentPolicyHeaderUseCounterTest, ShouldObserveUseCounterUpdate) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(DocumentPolicySimTest,
DocumentPolicyIframePolicyAttributeUseCounterTest) { … }
TEST_F(DocumentPolicySimTest, RequiredDocumentPolicyUseCounterTest) { … }
}