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/SubresourceIntegrity.h" | 5 #include "core/frame/SubresourceIntegrity.h" |
6 | 6 |
7 #include "core/HTMLNames.h" | 7 #include "core/HTMLNames.h" |
8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
9 #include "core/fetch/IntegrityMetadata.h" | |
10 #include "core/fetch/RawResource.h" | |
11 #include "core/fetch/Resource.h" | |
12 #include "core/html/HTMLScriptElement.h" | 9 #include "core/html/HTMLScriptElement.h" |
13 #include "platform/Crypto.h" | 10 #include "platform/Crypto.h" |
| 11 #include "platform/loader/fetch/IntegrityMetadata.h" |
| 12 #include "platform/loader/fetch/RawResource.h" |
| 13 #include "platform/loader/fetch/Resource.h" |
14 #include "platform/weborigin/KURL.h" | 14 #include "platform/weborigin/KURL.h" |
15 #include "platform/weborigin/SecurityOrigin.h" | 15 #include "platform/weborigin/SecurityOrigin.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "wtf/RefPtr.h" | 17 #include "wtf/RefPtr.h" |
18 #include "wtf/Vector.h" | 18 #include "wtf/Vector.h" |
19 #include "wtf/dtoa/utils.h" | 19 #include "wtf/dtoa/utils.h" |
20 #include "wtf/text/WTFString.h" | 20 #include "wtf/text/WTFString.h" |
21 | 21 |
22 namespace blink { | 22 namespace blink { |
23 | 23 |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 expectIntegrity(kBadSha256AndGoodSha384Integrities, kBasicScript, | 526 expectIntegrity(kBadSha256AndGoodSha384Integrities, kBasicScript, |
527 strlen(kBasicScript), secureURL, insecureURL); | 527 strlen(kBasicScript), secureURL, insecureURL); |
528 | 528 |
529 expectIntegrityFailure(kSha256Integrity, kBasicScript, strlen(kBasicScript), | 529 expectIntegrityFailure(kSha256Integrity, kBasicScript, strlen(kBasicScript), |
530 secureURL, insecureURL, NoCors); | 530 secureURL, insecureURL, NoCors); |
531 expectIntegrityFailure(kGoodSha256AndBadSha384Integrities, kBasicScript, | 531 expectIntegrityFailure(kGoodSha256AndBadSha384Integrities, kBasicScript, |
532 strlen(kBasicScript), secureURL, insecureURL); | 532 strlen(kBasicScript), secureURL, insecureURL); |
533 } | 533 } |
534 | 534 |
535 } // namespace blink | 535 } // namespace blink |
OLD | NEW |