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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-load-regular-script-after-failed-integrity.html

Issue 1579503004: Clear integrity failure bit in PendingScript on release (Closed) Base URL: https://chromium.googlesource.com/chromium/src@2564
Patch Set: Created 4 years, 11 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 | « no previous file | third_party/WebKit/Source/core/dom/PendingScript.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-load-regular-script-after-failed-integrity.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-load-regular-script-after-failed-integrity.html b/third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-load-regular-script-after-failed-integrity.html
new file mode 100644
index 0000000000000000000000000000000000000000..1e3584b8f6872221c1873518a3566c18bb8f40fa
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-load-regular-script-after-failed-integrity.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <!-- Regression test for https://crbug.com/570340 -->
+ <title>Script loaded after failed integrity check should still load</title>
+ </head>
+ <body>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script>
+ var should_fail_test = async_test('should fail');
+ var should_succeed_test = async_test('should succeed');
+
+ function should_fail(loaded) {
+ should_fail_test.step(function() {
+ if (loaded)
+ assert_unreached();
+ else
+ this.done();
+ });
+ }
+
+ function success() {
+ should_succeed_test.step(function() {
+ this.done();
+ });
+ }
+ </script>
+ <script onerror="should_fail(false);" onload="should_fail(true);" src="resources/simple-result.js" integrity="sha256-deadbeef"></script>
+ <script onerror="assert_unreached();" src="call-success.js"></script>
+ </body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/PendingScript.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698