| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta http-equiv="X-WebKit-CSP" content="connect-src http://localhost:8000"<scri
pt> | 4 <meta http-equiv="X-WebKit-CSP" content="connect-src http://localhost:8000"<scri
pt> |
| 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 xhr = new XMLHttpRequest; | 19 var xhr = new XMLHttpRequest; |
| 20 xhr.open("GET", "http://127.0.0.1:8000/xmlhttprequest/resources/get.txt", tr
ue); | 20 xhr.open("GET", "http://127.0.0.1:8000/xmlhttprequest/resources/get.txt", tr
ue); |
| 21 log("Fail"); | 21 log("Fail"); |
| 22 } catch(e) { | 22 } catch(e) { |
| 23 log("Pass"); | 23 log("Pass"); |
| 24 } | 24 } |
| 25 | 25 |
| 26 </script> | 26 </script> |
| 27 <p>This test passes if the malformed meta tag doesn't cause a crash and the reso
urce is blocked.</p> | 27 <p>This test passes if the malformed meta tag doesn't cause a crash and the reso
urce is blocked.</p> |
| 28 </body> | 28 </body> |
| 29 </html> | 29 </html> |
| OLD | NEW |