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

Side by Side Diff: third_party/WebKit/Source/core/frame/FeaturePolicyInFrameTest.cpp

Issue 2691343010: Split ConditionalFeatures (Closed)
Patch Set: Rebase, code review changes Created 3 years, 10 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/feature_policy/FeaturePolicy.h" 5 #include "platform/feature_policy/FeaturePolicy.h"
6 6
7 #include "bindings/core/v8/ConditionalFeatures.h" 7 #include "bindings/core/v8/ConditionalFeaturesForCore.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/testing/DummyPageHolder.h" 9 #include "core/testing/DummyPageHolder.h"
10 #include "platform/RuntimeEnabledFeatures.h" 10 #include "platform/RuntimeEnabledFeatures.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 // Origin strings used for tests 13 // Origin strings used for tests
14 #define ORIGIN_A "https://example.com/" 14 #define ORIGIN_A "https://example.com/"
15 #define ORIGIN_B "https://example.net/" 15 #define ORIGIN_B "https://example.net/"
16 16
17 namespace blink { 17 namespace blink {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 std::unique_ptr<FeaturePolicy> policy1 = 124 std::unique_ptr<FeaturePolicy> policy1 =
125 createFromParentPolicy(nullptr, m_originA); 125 createFromParentPolicy(nullptr, m_originA);
126 policy1->setHeaderPolicy(FeaturePolicy::parseFeaturePolicy( 126 policy1->setHeaderPolicy(FeaturePolicy::parseFeaturePolicy(
127 "{\"default-on\": []}", m_originA.get(), &messages)); 127 "{\"default-on\": []}", m_originA.get(), &messages));
128 EXPECT_EQ(0UL, messages.size()); 128 EXPECT_EQ(0UL, messages.size());
129 document().setFeaturePolicyForTesting(std::move(policy1)); 129 document().setFeaturePolicyForTesting(std::move(policy1));
130 EXPECT_TRUE(isFeatureEnabledInFrame(kDefaultOnFeature, frame())); 130 EXPECT_TRUE(isFeatureEnabledInFrame(kDefaultOnFeature, frame()));
131 } 131 }
132 132
133 } // namespace blink 133 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698