#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/permissions_policy/dom_feature_policy.h"
#include "third_party/blink/renderer/core/permissions_policy/iframe_policy.h"
#include "third_party/blink/renderer/core/permissions_policy/permissions_policy_parser.h"
#include "third_party/blink/renderer/core/testing/dummy_page_holder.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
namespace blink {
namespace {
constexpr char kSelfOrigin[] = …;
constexpr char kOriginA[] = …;
constexpr char kOriginASubdomain[] = …;
constexpr char kOriginB[] = …;
constexpr char kOriginBSubdomain[] = …;
}
UnorderedElementsAre;
class PolicyTest : public testing::Test { … };
class DOMFeaturePolicyTest : public PolicyTest { … };
class IFramePolicyTest : public PolicyTest { … };
TEST_F(DOMFeaturePolicyTest, TestAllowsFeature) { … }
TEST_F(DOMFeaturePolicyTest, TestGetAllowList) { … }
TEST_F(DOMFeaturePolicyTest, TestAllowedFeatures) { … }
TEST_F(IFramePolicyTest, TestAllowsFeature) { … }
TEST_F(IFramePolicyTest, TestGetAllowList) { … }
TEST_F(IFramePolicyTest, TestSameOriginAllowedFeatures) { … }
TEST_F(IFramePolicyTest, TestCrossOriginAllowedFeatures) { … }
TEST_F(IFramePolicyTest, TestCombinedPolicyOnOriginA) { … }
TEST_F(IFramePolicyTest, TestCombinedPolicyOnOriginASubdomain) { … }
TEST_F(IFramePolicyTest, TestCombinedPolicyOnOriginB) { … }
TEST_F(IFramePolicyTest, TestCombinedPolicyOnOriginBSubdomain) { … }
}