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

Unified Diff: Source/core/frame/SubresourceIntegrityTest.cpp

Issue 1166003004: SRI fail open on ineligible resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove a bunch of -expected.txt files Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/SubresourceIntegrity.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/SubresourceIntegrityTest.cpp
diff --git a/Source/core/frame/SubresourceIntegrityTest.cpp b/Source/core/frame/SubresourceIntegrityTest.cpp
index f906768d7c61cdf227528a4fb6efbe6081610998..56f891b8e48499b89104779ea52b37d8302d9b30 100644
--- a/Source/core/frame/SubresourceIntegrityTest.cpp
+++ b/Source/core/frame/SubresourceIntegrityTest.cpp
@@ -439,12 +439,11 @@ TEST_F(SubresourceIntegrityTest, CheckSubresourceIntegrityInInsecureOrigin)
expectIntegrity(kSha256AndSha384Integrities, kBasicScript, secureURL, insecureURL);
expectIntegrity(kBadSha256AndGoodSha384Integrities, kBasicScript, secureURL, insecureURL);
- expectIntegrityFailure(kGoodSha256AndBadSha384Integrities, kBasicScript, secureURL, insecureURL);
+ // The cross origin (http -> https case) should return true, but it will
+ // output a console error.
+ expectIntegrity(kSha256Integrity, kBasicScript, secureURL, insecureURL, NoCors);
- // This check should fail because, unlike in the
- // CheckSubresourceIntegrityInSecureOrigin case, this is cross origin
- // (secure origin requesting a resource on an insecure origin)
- expectIntegrityFailure(kSha256Integrity, kBasicScript, secureURL, insecureURL, NoCors);
+ expectIntegrityFailure(kGoodSha256AndBadSha384Integrities, kBasicScript, secureURL, insecureURL);
}
} // namespace blink
« no previous file with comments | « Source/core/frame/SubresourceIntegrity.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698