4 <script src=
"/js-test-resources/js-test.js"></script>
8 description("Test that a subresource with a crossorigin=use-credentials attribute loads the expected CORS enabled resources.");
10 <script src=
"resources/link-crossorigin-common.js"></script>
11 <link crossorigin=
"use-credentials" rel=
"subresource" href=
"http://localhost:8080/security/resources/abe-allow-credentials.php" onload=
"pass()" onerror=
"fail()">
12 <link crossorigin=
"use-credentials" rel=
"subresource" href=
"http://localhost:8080/security/resources/abe-allow-star.php" onload=
"fail()" onerror=
"pass()">
16 // Test that dynamically inserted <link> elements are handled the same way.
17 var link
= document
.createElement("link");
18 link
.rel
= "subresource";
19 link
.crossOrigin
= "anonymous";
22 link
.href
= "http://localhost:8080/security/resources/abe-allow-credentials.php?1";
23 document
.body
.appendChild(link
);
25 link
= document
.createElement("link");
26 link
.rel
= "subresource";
27 link
.crossOrigin
= "use-credentials";
30 link
.href
= "http://localhost:8080/security/resources/abe-allow-star.php?1";
31 document
.body
.appendChild(link
);
33 window
.onload
= runTest
;