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
loads a cross-origin script correctly when the CORS check passes on the respons
e.</p> |
| 8 <pre></pre> |
| 9 <script><![CDATA[ |
| 10 if (window.testRunner) { |
| 11 testRunner.dumpAsText(); |
| 12 testRunner.waitUntilDone(); |
| 13 } |
| 14 |
| 15 var result = "FAIL"; |
| 16 var have_reported = false; |
| 17 function loaded() { |
| 18 if (!have_reported) { |
| 19 document.querySelector("pre").innerHTML = result; |
| 20 if (window.testRunner) |
| 21 testRunner.notifyDone(); |
| 22 have_reported = true; |
| 23 } |
| 24 } |
| 25 ]]></script> |
| 26 <!-- This script should load --> |
| 27 <script crossorigin="anonymous" src="http://localhost:8000/security/resources/co
rs-script.php?cors=true&&value=PASS"></script> |
| 28 <script><![CDATA[loaded();]]></script> |
| 29 </body> |
| 30 </html> |
OLD | NEW |