Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / security / script-crossorigin-loads-cross-origin-2.xhtml
blob524272f4169ed45bfac0bfdce29599fba9d0563f
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 response.</p>
8 <pre></pre>
9 <script><![CDATA[
10 if (window.testRunner) {
11 testRunner.dumpAsText();
12 testRunner.waitUntilDone();
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;
25 ]]></script>
26 <!-- This script should load -->
27 <script crossorigin="anonymous" src="http://localhost:8000/security/resources/cors-script.php?cors=true&amp;&amp;value=PASS"></script>
28 <script><![CDATA[loaded();]]></script>
29 </body>
30 </html>