OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <p>Test that script elements that are fetched with CORS enabled and conditionall
y, pass the expected access controls.</p> |
| 3 <pre></pre> |
| 4 <script> |
| 5 if (window.testRunner) { |
| 6 testRunner.dumpAsText(); |
| 7 testRunner.waitUntilDone(); |
| 8 } |
| 9 |
| 10 function log(msg) |
| 11 { |
| 12 document.querySelector("pre").innerHTML = msg; |
| 13 } |
| 14 |
| 15 var count = 0; |
| 16 function finish(ok) { |
| 17 // Called by the iframe upon completing the fetch of its script. |
| 18 if (ok && count++ < 2) { |
| 19 document.querySelector("iframe").contentWindow.location.reload(); |
| 20 return; |
| 21 } |
| 22 log((ok ? "PASS" : "FAIL") + ": crossorigin script repeatedly and conditiona
lly loaded."); |
| 23 if (window.testRunner) |
| 24 testRunner.notifyDone(); |
| 25 } |
| 26 </script> |
| 27 <iframe src="resources/iframe-crossorigin-script.html""></iframe> |
OLD | NEW |