OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 |
| 4 <head> |
| 5 <!-- Programmatically converted from a WebKit Reftest, please forgive result
ing idiosyncracies.--> |
| 6 <title>worker-importscripts-blocked</title> |
| 7 <script src="/resources/testharness.js"></script> |
| 8 <script src="/resources/testharnessreport.js"></script> |
| 9 <script src='../support/logTest.sub.js?logs=["TEST COMPLETE"]'></script> |
| 10 <script src="../support/alertAssert.sub.js?alerts=[]"></script> |
| 11 <!-- enforcing policy: |
| 12 script-src 'self' 'unsafe-inline' 'unsafe-eval' 'unsafe-inline' 127.0.0.1:8000;
connect-src 'self'; |
| 13 --> |
| 14 <script></script> |
| 15 </head> |
| 16 |
| 17 <body> |
| 18 <script> |
| 19 window.wasPostTestScriptParsed = true; |
| 20 var result = ''; |
| 21 try { |
| 22 var worker = new Worker('http://{{host}}:{{ports[http][0]}}/content-
security-policy/blink-contrib/resources/worker-importscripts.js'); |
| 23 worker.onmessage = function(event) { |
| 24 result = event.data; |
| 25 test(function() { |
| 26 assert_equals(result, 'importScripts blocked') |
| 27 }); |
| 28 log("TEST COMPLETE"); |
| 29 }; |
| 30 } catch (e) { |
| 31 result = e; |
| 32 test(function() { |
| 33 assert_equals(result, 'importScripts blocked') |
| 34 }); |
| 35 log("TEST COMPLETE"); |
| 36 } |
| 37 |
| 38 </script> |
| 39 <div id="log"></div> |
| 40 <script async defer src="../support/checkReport.sub.js?reportExists=false"><
/script> |
| 41 </body> |
| 42 |
| 43 </html> |
OLD | NEW |