Index: third_party/WebKit/Source/core/frame/FeaturePolicyInFrameTest.cpp |
diff --git a/third_party/WebKit/Source/core/frame/FeaturePolicyInFrameTest.cpp b/third_party/WebKit/Source/core/frame/FeaturePolicyInFrameTest.cpp |
index f9375547350c107c1521230fb5f05012edc7da49..b2b45c12721e0d3eec4779b5ca086e9c53aa1e37 100644 |
--- a/third_party/WebKit/Source/core/frame/FeaturePolicyInFrameTest.cpp |
+++ b/third_party/WebKit/Source/core/frame/FeaturePolicyInFrameTest.cpp |
@@ -98,8 +98,9 @@ TEST_F(FeaturePolicyInFrameTest, TestFeatureOverriddenInFrame) { |
Vector<String> messages; |
std::unique_ptr<FeaturePolicy> policy1 = |
createFromParentPolicy(nullptr, m_originA); |
- policy1->setHeaderPolicy("{\"default-off\": [\"self\"], \"default-on\": []}", |
- &messages); |
+ policy1->setHeaderPolicy(FeaturePolicy::parseFeaturePolicy( |
+ "{\"default-off\": [\"self\"], \"default-on\": []}", m_originA.get(), |
+ &messages)); |
EXPECT_EQ(0UL, messages.size()); |
document().setFeaturePolicyForTesting(std::move(policy1)); |
EXPECT_TRUE(isFeatureEnabledInFrame(kDefaultOffFeature, frame())); |
@@ -122,7 +123,8 @@ TEST_F(FeaturePolicyInFrameTest, TestPolicyInactiveWhenFPDisabled) { |
Vector<String> messages; |
std::unique_ptr<FeaturePolicy> policy1 = |
createFromParentPolicy(nullptr, m_originA); |
- policy1->setHeaderPolicy("{\"default-on\": []}", &messages); |
+ policy1->setHeaderPolicy(FeaturePolicy::parseFeaturePolicy( |
+ "{\"default-on\": []}", m_originA.get(), &messages)); |
EXPECT_EQ(0UL, messages.size()); |
document().setFeaturePolicyForTesting(std::move(policy1)); |
EXPECT_TRUE(isFeatureEnabledInFrame(kDefaultOnFeature, frame())); |