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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/blink-contrib/star-doesnt-match-blob.sub.html

Issue 2695813009: Import wpt@503f5b5f78ec4e87d144f78609f363f0ed0ea8db (Closed)
Patch Set: Skip some tests Created 3 years, 10 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 <html>
3
4 <head>
5 <!-- Programmatically converted from a WebKit Reftest, please forgive result ing idiosyncracies.-->
6 <title>worker-connect-src-blocked</title>
7 <script src="/resources/testharness.js"></script>
8 <script src="/resources/testharnessreport.js"></script>
9 <script src="../support/logTest.sub.js?logs=[]"></script>
10 <script src='../support/alertAssert.sub.js?alerts=["TEST COMPLETE"]'></scrip t>
11 <!-- enforcing policy:
12 connect-src 'self'; script-src 'self' 'unsafe-inline'; child-src *;
13 -->
14
15 </head>
16 <p>This test loads a worker, from a guid.
17 The worker should be blocked from loading with a child-src policy of *
18 as the blob: scheme must be specified explicitly.
19 A report should be sent to the report-uri specified
20 with this resource.</p>
21 <body>
22 <script>
23 try {
24 var blob = new Blob([
25 "postMessage('FAIL');" +
26 "postMessage('TEST COMPLETE');"
27 ],
28 {type : 'application/javascript'});
29 var url = URL.createObjectURL(blob);
30 var worker = new Worker(url);
31 worker.onmessage = function(event) {
32 alert_assert(event.data);
33 };
34 worker.onerror = function(event) {
35 event.preventDefault();
36 alert_assert('TEST COMPLETE');
37 }
38 } catch (e) {
39 alert_assert('TEST COMPLETE');
40 }
41 function timeout() {
42 alert_assert('TEST COMPLETE');
43 }
44 </script>
45 <div id="log"></div>
46 <script async defer src="../support/checkReport.sub.js?reportExists=true&am p;reportField=violated-directive&amp;reportValue=child-src%20&apos;self&apos;">< /script>
47 </body>
48
49 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698