OLD | NEW |
(Empty) | |
| 1 <?xml version="1.0"?> |
| 2 <html xmlns='http://www.w3.org/1999/xhtml'> |
| 3 <head> |
| 4 <title>crossorigin and XHTML</title> |
| 5 </head> |
| 6 <body> |
| 7 <p>In an XHTML document, test that a script element with a crossorigin attribute
does not load a cross-origin script when the resource sharing check fails on th
e response.</p> |
| 8 <pre></pre> |
| 9 <script> |
| 10 if (window.testRunner) { |
| 11 testRunner.dumpAsText(); |
| 12 testRunner.waitUntilDone(); |
| 13 } |
| 14 |
| 15 var result = "PASS"; |
| 16 |
| 17 function must_not_fire() { |
| 18 result = "FAIL"; |
| 19 } |
| 20 |
| 21 function loaded() { |
| 22 document.querySelector("pre").innerHTML = result; |
| 23 if (window.testRunner) |
| 24 testRunner.notifyDone(); |
| 25 } |
| 26 </script> |
| 27 <!-- This script should _not_ load, nor fire onload. --> |
| 28 <script crossorigin="anonymous" src="http://localhost:8000/security/resources/co
rs-script.php?cors=false&value=FAIL" onload="must_not_fire()"></script> |
| 29 <script><![CDATA[loaded();]]></script> |
| 30 </body> |
| 31 </html> |
| 32 |
OLD | NEW |