Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Unified Diff: third_party/WebKit/Source/core/frame/FeaturePolicyInFrameTest.cpp

Issue 2520223002: Replicate a parsed feature policy representation so it doesn't need to be parsed in the browser pro… (Closed)
Patch Set: Replicate a parsed feature policy representation so it doesn't need to be parsed in the browser pro… Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()));
« no previous file with comments | « third_party/WebKit/Source/core/dom/SecurityContext.cpp ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698