OLD | NEW |
1 <body> | 1 <body> |
2 <p>This test passes if the script loads correctly.</p> | 2 <p>This test passes if the script loads correctly.</p> |
3 <pre></pre> | 3 <pre></pre> |
4 <script> | 4 <script> |
5 if (window.testRunner) { | 5 if (window.testRunner) { |
6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
7 testRunner.waitUntilDone(); | 7 testRunner.waitUntilDone(); |
8 } | 8 } |
9 | 9 |
10 function done(msg) { | 10 function done(msg) { |
11 document.querySelector("pre").innerHTML = msg; | 11 document.querySelector("pre").innerHTML = msg; |
12 if (window.testRunner) | 12 if (window.testRunner) |
13 testRunner.notifyDone(); | 13 testRunner.notifyDone(); |
14 } | 14 } |
15 | 15 |
16 var script = document.createElement("script"); | 16 var script = document.createElement("script"); |
17 script.crossOrigin = ""; | 17 script.crossOrigin = "anonymous"; |
18 script.src = "http://localhost:8000/security/resources/cors-script.php"; | 18 script.src = "http://localhost:8000/security/resources/cors-script.php"; |
19 script.onload = function() { done("PASS"); } | 19 script.onload = function() { done("PASS"); } |
20 script.onerror = function() { done("FAIL");} | 20 script.onerror = function() { done("FAIL");} |
21 document.body.appendChild(script); | 21 document.body.appendChild(script); |
22 </script> | 22 </script> |
OLD | NEW |