OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta http-equiv="Content-Security-Policy" content="connect-src http://localhost
:8000"> | 4 <meta http-equiv="Content-Security-Policy" content="connect-src http://localhost
:8000"> |
5 <script> | 5 <script> |
6 if (window.testRunner) | 6 if (window.testRunner) |
7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
8 </script> | 8 </script> |
9 </head> | 9 </head> |
10 <body> | 10 <body> |
11 <pre id="console"></pre> | 11 <pre id="console"></pre> |
12 <script> | 12 <script> |
13 function log(msg) | 13 function log(msg) |
14 { | 14 { |
15 document.getElementById("console").appendChild(document.createTextNode(msg +
"\n")); | 15 document.getElementById("console").appendChild(document.createTextNode(msg +
"\n")); |
16 } | 16 } |
17 | 17 |
18 try { | 18 try { |
19 var es = new EventSource("http://127.0.0.1:8000/eventsource/resources/simple
-event-stream.asis"); | 19 var es = navigator.sendBeacon("http://127.0.0.1:8000/security/contentSecurit
yPolicy/echo-report.php"); |
20 log("Fail"); | 20 log("Fail"); |
21 } catch(e) { | 21 } catch(e) { |
22 log("Pass"); | 22 log("Pass"); |
23 } | 23 } |
24 | |
25 </script> | 24 </script> |
26 </body> | 25 </body> |
27 </html> | 26 </html> |
OLD | NEW |