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

Side by Side Diff: LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-options.html

Issue 1126343003: Ignore unknown options to subresource integrity (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed option parsing + nits from mkwst Created 5 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <head>
3 <title>SRI with options</title>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 </head>
7 <body>
8 <script>
9 var tests = [
10 "sha256-B0/62fJSJFrdjEFR9ba04m/D+LHQ+zG6PGcaR0Trpxg=?foo=bar",
11 "sha256-B0/62fJSJFrdjEFR9ba04m/D+LHQ+zG6PGcaR0Trpxg=?foo=bar?baz=foz",
12 "sha256-B0/62fJSJFrdjEFR9ba04m/D+LHQ+zG6PGcaR0Trpxg=?",
13 "sha256-B0/62fJSJFrdjEFR9ba04m/D+LHQ+zG6PGcaR0Trpxg=?foobar",
14 "sha256-B0/62fJSJFrdjEFR9ba04m/D+LHQ+zG6PGcaR0Trpxg=?foo=bar?",
15 "sha256-B0/62fJSJFrdjEFR9ba04m/D+LHQ+zG6PGcaR0Trpxg=?foo&bar?",
16 ];
17
18 var success;
19
20 function addTest() {
21 var next_test = tests.shift();
22 if (next_test)
23 async_test(makeTest(next_test));
24 }
25
26 function makeTest(integrity) {
27 return function() {
28 var script = document.createElement('script');
29 success = this.step_func(function() {
30 addTest();
31 this.done();
32 });
33 var scriptError = this.step_func(function() {
34 assert_unreached();
35 addTest();
36 this.done();
37 });
38 script.src = 'call-success.js';
39 script.onerror = scriptError;
40 script.integrity = integrity;
41 document.body.appendChild(script);
42 };
43 }
44
45 async_test(makeTest(tests.shift()));
46 </script>
47 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698