OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="/js-test-resources/js-test.js"></script> | 4 <script src="/js-test-resources/js-test.js"></script> |
5 <script>window.test_count = 8;</script> | 5 <script>window.testCount = 8;</script> |
6 <script src="resources/link-crossorigin-common.js"></script> | 6 <script src="resources/link-crossorigin-common.js"></script> |
7 </head> | 7 </head> |
8 <body> | 8 <body> |
9 <p>Test that a linked stylesheet with a crossorigin attribute does not load a cr
oss-origin resource that isn't CORS enabled.</p> | 9 <p>Test that a linked stylesheet with a crossorigin attribute does not load a cr
oss-origin resource that isn't CORS enabled.</p> |
10 <link crossorigin="anonymous" rel="stylesheet" href="http://localhost:8080/secur
ity/resources/green-background.css?1" onload="fail()" onerror="pass()"> | 10 <link crossorigin="anonymous" rel="stylesheet" href="http://localhost:8080/secur
ity/resources/green-background.css?1" onload="fail()" onerror="pass()"> |
11 <link crossorigin="use-credentials" rel="stylesheet" href="http://localhost:8080
/security/resources/green-background.css?2" onload="fail()" onerror="pass()"> | 11 <link crossorigin="use-credentials" rel="stylesheet" href="http://localhost:8080
/security/resources/green-background.css?2" onload="fail()" onerror="pass()"> |
12 <!-- Check that from-cache loads are also failing (and does not generate separat
e loads.) --> | 12 <!-- Check that from-cache loads are also failing (and does not generate separat
e loads.) --> |
13 <link crossorigin="anonymous" rel="stylesheet" href="http://localhost:8080/secur
ity/resources/green-background.css?1" onload="fail()" onerror="pass()"> | 13 <link crossorigin="anonymous" rel="stylesheet" href="http://localhost:8080/secur
ity/resources/green-background.css?1" onload="fail()" onerror="pass()"> |
14 <link crossorigin="use-credentials" rel="stylesheet" href="http://localhost:8080
/security/resources/green-background.css?2" onload="fail()" onerror="pass()"> | 14 <link crossorigin="use-credentials" rel="stylesheet" href="http://localhost:8080
/security/resources/green-background.css?2" onload="fail()" onerror="pass()"> |
15 <!-- These are same-origin and should load as the fetch wasn't out of origin --> | 15 <!-- These are same-origin and should load as the fetch wasn't out of origin --> |
(...skipping 16 matching lines...) Expand all Loading... |
32 link.crossOrigin = "use-credentials"; | 32 link.crossOrigin = "use-credentials"; |
33 link.onload = fail; | 33 link.onload = fail; |
34 link.onerror = pass; | 34 link.onerror = pass; |
35 link.href = "http://localhost:8080/security/resources/green-background.css?9
"; | 35 link.href = "http://localhost:8080/security/resources/green-background.css?9
"; |
36 document.body.appendChild(link); | 36 document.body.appendChild(link); |
37 } | 37 } |
38 window.onload = runTest; | 38 window.onload = runTest; |
39 </script> | 39 </script> |
40 </body> | 40 </body> |
41 </html> | 41 </html> |
OLD | NEW |