OLD | NEW |
(Empty) | |
| 1 <p>Test that a script element with a crossorigin attribute loads a cross-origin
script correctly when the CORS check passes on the response.</p> |
| 2 <pre></pre> |
| 3 <script> |
| 4 if (window.testRunner) { |
| 5 testRunner.dumpAsText(); |
| 6 testRunner.waitUntilDone(); |
| 7 } |
| 8 |
| 9 var result = "FAIL"; |
| 10 var have_reported = false; |
| 11 function loaded() { |
| 12 if (!have_reported) { |
| 13 document.querySelector("pre").innerHTML = result; |
| 14 if (window.testRunner) |
| 15 testRunner.notifyDone(); |
| 16 have_reported = true; |
| 17 } |
| 18 } |
| 19 </script> |
| 20 <!-- This script should load --> |
| 21 <script crossorigin="anonymous" src="http://localhost:8000/security/resources/co
rs-script.php?cors=true&value=PASS" onload="loaded()"></script> |
| 22 <script>loaded();</script> |
OLD | NEW |