OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <p>Test that a linked stylesheet with a crossorigin=use-credentials attributes l
oads expected CORS enabled resources.</p> |
| 3 <pre></pre> |
| 4 <script src="resources/link-crossorigin-common.js"></script> |
| 5 <link crossorigin="use-credentials" rel="stylesheet" href="http://localhost:8080
/security/resources/green-background-allow-credentials.php" onload="pass()" oner
ror="fail()"> |
| 6 <link crossorigin="use-credentials" rel="stylesheet" href="http://localhost:8080
/security/resources/green-background-allow-star.php" onload="fail()" onerror="pa
ss()"> |
| 7 <script> |
| 8 // Test that dynamically inserted <link> elements are handled the same way. |
| 9 var link = document.createElement("link"); |
| 10 link.rel = "stylesheet"; |
| 11 link.crossOrigin = "use-credentials"; |
| 12 link.onload = pass; |
| 13 link.onerror = fail; |
| 14 link.href = "http://localhost:8080/security/resources/green-background-allow-cre
dentials.php"; |
| 15 document.body.appendChild(link); |
| 16 |
| 17 link = document.createElement("link"); |
| 18 link.rel = "stylesheet"; |
| 19 link.crossOrigin = "use-credentials"; |
| 20 link.onload = fail; |
| 21 link.onerror = pass; |
| 22 link.href = "http://localhost:8080/security/resources/green-background-allow-sta
r.php"; |
| 23 document.body.appendChild(link); |
| 24 </script> |
OLD | NEW |