| <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> |
| <pre></pre> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| var result = "FAIL"; |
| var have_reported = false; |
| function loaded() { |
| if (!have_reported) { |
| document.querySelector("pre").innerHTML = result; |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| have_reported = true; |
| } |
| } |
| </script> |
| <!-- This script should load --> |
| <script crossorigin="anonymous" src="http://localhost:8000/security/resources/cors-script.php?cors=true&value=PASS" onload="loaded()"></script> |
| <script>loaded();</script> |