OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 |
| 4 <head> |
| 5 <title>child-src-worker-allowed</title> |
| 6 <script src="/resources/testharness.js"></script> |
| 7 <script src="/resources/testharnessreport.js"></script> |
| 8 <script src="../support/logTest.sub.js?logs=[]"></script> |
| 9 <script src='../support/alertAssert.sub.js?alerts=["PASS"]'></script> |
| 10 <!-- enforcing policy: |
| 11 child-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-inline'; connect-src
'self'; |
| 12 --> |
| 13 |
| 14 </head> |
| 15 |
| 16 <body> |
| 17 <script> |
| 18 try { |
| 19 var foo = new Worker('http://{{host}}:{{ports[http][0]}}/content-sec
urity-policy/blink-contrib/resources/post-message.js'); |
| 20 foo.onmessage = function(event) { |
| 21 alert_assert("PASS"); |
| 22 }; |
| 23 } catch (e) { |
| 24 alert_assert(e); |
| 25 } |
| 26 |
| 27 </script> |
| 28 <div id="log"></div> |
| 29 <script async defer src="../support/checkReport.sub.js?reportExists=false"><
/script> |
| 30 </body> |
| 31 |
| 32 </html> |
OLD | NEW |