OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <p>Test that a subresource with a crossorigin=anonymous loads a CORS enabled res
ource.</p> |
| 3 <pre></pre> |
| 4 <script src="resources/link-crossorigin-common.js"></script> |
| 5 <link crossorigin="anonymous" rel="subresource" href="http://localhost:8080/secu
rity/resources/abe-allow-star.php" onload="pass()" onerror="fail()"> |
| 6 <link crossorigin="anonymous" rel="subresource" href="http://localhost:8080/secu
rity/resources/abe-allow-credentials.php" onload="pass()" onerror="fail()"> |
| 7 <script> |
| 8 // Test that dynamically inserted <link> elements are handled the same way. |
| 9 var link = document.createElement("link"); |
| 10 link.rel = "subresource"; |
| 11 link.crossOrigin = "anonymous"; |
| 12 link.onload = pass; |
| 13 link.onerror = fail; |
| 14 link.href = "http://localhost:8080/security/resources/abe-allow-star.php?1"; |
| 15 document.body.appendChild(link); |
| 16 |
| 17 link = document.createElement("link"); |
| 18 link.rel = "subresource"; |
| 19 link.crossOrigin = "anonymous"; |
| 20 link.onload = pass; |
| 21 link.onerror = fail; |
| 22 link.href = "http://localhost:8080/security/resources/abe-allow-credentials.php?
1"; |
| 23 document.body.appendChild(link); |
| 24 </script> |
OLD | NEW |