| Index: LayoutTests/http/tests/security/script-crossorigin-fails-cross-origin.html
|
| diff --git a/LayoutTests/http/tests/security/script-crossorigin-fails-cross-origin.html b/LayoutTests/http/tests/security/script-crossorigin-fails-cross-origin.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..26effd73e1a4417f33e77abf2c9d4e307c7dad34
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/security/script-crossorigin-fails-cross-origin.html
|
| @@ -0,0 +1,24 @@
|
| +<p>Test that a script element with a crossorigin attribute does not load a cross-origin script when the resource sharing check fails on the response.</p>
|
| +<pre></pre>
|
| +<script>
|
| +if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.waitUntilDone();
|
| +}
|
| +
|
| +var result = "PASS";
|
| +
|
| +function must_not_fire() {
|
| + result = "FAIL";
|
| +}
|
| +
|
| +function loaded() {
|
| + document.querySelector("pre").innerHTML = result;
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| +}
|
| +</script>
|
| +<!-- This script should _not_ load, nor fire onload. -->
|
| +<script crossorigin="anonymous" src="http://localhost:8000/security/resources/cors-script.php?cors=false&value=FAIL" onload="must_not_fire()"></script>
|
| +<script>loaded();</script>
|
| +
|
|
|