OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "core/frame/csp/ContentSecurityPolicy.h" | 5 #include "core/frame/csp/ContentSecurityPolicy.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
8 #include "core/fetch/IntegrityMetadata.h" | |
9 #include "core/frame/csp/CSPDirectiveList.h" | 8 #include "core/frame/csp/CSPDirectiveList.h" |
10 #include "core/html/HTMLScriptElement.h" | 9 #include "core/html/HTMLScriptElement.h" |
11 #include "core/loader/DocumentLoader.h" | 10 #include "core/loader/DocumentLoader.h" |
12 #include "core/testing/DummyPageHolder.h" | 11 #include "core/testing/DummyPageHolder.h" |
13 #include "platform/Crypto.h" | 12 #include "platform/Crypto.h" |
14 #include "platform/RuntimeEnabledFeatures.h" | 13 #include "platform/RuntimeEnabledFeatures.h" |
| 14 #include "platform/loader/fetch/IntegrityMetadata.h" |
15 #include "platform/network/ContentSecurityPolicyParsers.h" | 15 #include "platform/network/ContentSecurityPolicyParsers.h" |
16 #include "platform/network/ResourceRequest.h" | 16 #include "platform/network/ResourceRequest.h" |
17 #include "platform/weborigin/KURL.h" | 17 #include "platform/weborigin/KURL.h" |
18 #include "platform/weborigin/SecurityOrigin.h" | 18 #include "platform/weborigin/SecurityOrigin.h" |
19 #include "public/platform/WebAddressSpace.h" | 19 #include "public/platform/WebAddressSpace.h" |
20 #include "public/platform/WebInsecureRequestPolicy.h" | 20 #include "public/platform/WebInsecureRequestPolicy.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 | 22 |
23 namespace blink { | 23 namespace blink { |
24 | 24 |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 EXPECT_FALSE(csp->subsumes(*other)); | 983 EXPECT_FALSE(csp->subsumes(*other)); |
984 | 984 |
985 // `other` is stricter than `this`. | 985 // `other` is stricter than `this`. |
986 other->didReceiveHeader("default-src https://example.com;", | 986 other->didReceiveHeader("default-src https://example.com;", |
987 ContentSecurityPolicyHeaderTypeEnforce, | 987 ContentSecurityPolicyHeaderTypeEnforce, |
988 ContentSecurityPolicyHeaderSourceHTTP); | 988 ContentSecurityPolicyHeaderSourceHTTP); |
989 EXPECT_TRUE(csp->subsumes(*other)); | 989 EXPECT_TRUE(csp->subsumes(*other)); |
990 } | 990 } |
991 | 991 |
992 } // namespace blink | 992 } // namespace blink |
OLD | NEW |