Index: LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-invalid-integrity.html |
diff --git a/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-invalid-integrity.html b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-invalid-integrity.html |
index 28e2074beb386683db628d41719cd4b661084eec..a8a6a644281e9639fa3f7a2449f685aebf56acbb 100644 |
--- a/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-invalid-integrity.html |
+++ b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-invalid-integrity.html |
@@ -1,15 +1,26 @@ |
<!DOCTYPE html> |
<html> |
+ <head> |
+ <title>SRI invalid integrity attributes</title> |
+ <script src="/resources/testharness.js"></script> |
+ <script src="/resources/testharnessreport.js"></script> |
+ </head> |
<body> |
<script> |
- if (window.testRunner) |
- testRunner.dumpAsText(); |
+ var count = 0; |
+ function checkDone() { |
+ if (count == 2) |
+ done(); |
+ count++; |
+ } |
+ var success = checkDone; |
+ function scriptError() { |
+ assert_unreached("Script failed to load."); |
+ checkDone(); |
+ } |
</script> |
- <p> |
- This test passes if no 'FAIL' alert appears. |
- </p> |
- <script src='fail.js' integrity="sha256;yM5ZyzNsyKfaXRY78zSGapeQKtl0oGdpPpYxgwl8XW8="></script> |
- <script src='fail.js' integrity="sha256:yM5ZyzNsyKfaXRY78zSGapeQKtl0oGdpPpYxgwl8XW8="></script> |
- <script src='fail.js' integrity="sha256-(yM5ZyzNsyKfaXRY78zSGapeQKtl0oGdpPpYxgwl8XW8=)"></script> |
+ <script src='call-success.js' onerror="scriptError();" integrity="sha256;B0_62fJSJFrdjEFR9ba04m_D-LHQ-zG6PGcaR0Trpxg="></script> |
+ <script src='call-success.js' onerror="scriptError();" integrity="sha256:B0_62fJSJFrdjEFR9ba04m_D-LHQ-zG6PGcaR0Trpxg="></script> |
+ <script src='call-success.js' onerror="scriptError();" integrity="sha256-(B0_62fJSJFrdjEFR9ba04m_D-LHQ-zG6PGcaR0Trpxg=)"></script> |
</body> |
</html> |