Index: LayoutTests/http/tests/security/link-crossorigin-subresource-use-credentials.html |
diff --git a/LayoutTests/http/tests/security/link-crossorigin-subresource-use-credentials.html b/LayoutTests/http/tests/security/link-crossorigin-subresource-use-credentials.html |
index 907dbb3878a9022a90c7c0427a15ca77b7f623d0..736b036f468b4459b6efd25973c8b5288fa799d0 100644 |
--- a/LayoutTests/http/tests/security/link-crossorigin-subresource-use-credentials.html |
+++ b/LayoutTests/http/tests/security/link-crossorigin-subresource-use-credentials.html |
@@ -1,24 +1,36 @@ |
<!DOCTYPE HTML> |
-<p>Test that a subresource with a crossorigin=use-credentials attribute loads the expected CORS enabled resources.</p> |
-<pre></pre> |
+<html> |
+<head> |
+<script src="/js-test-resources/js-test.js"></script> |
+</head> |
+<body> |
+<script> |
+description("Test that a subresource with a crossorigin=use-credentials attribute loads the expected CORS enabled resources."); |
+</script> |
<script src="resources/link-crossorigin-common.js"></script> |
<link crossorigin="use-credentials" rel="subresource" href="http://localhost:8080/security/resources/abe-allow-credentials.php" onload="pass()" onerror="fail()"> |
<link crossorigin="use-credentials" rel="subresource" href="http://localhost:8080/security/resources/abe-allow-star.php" onload="fail()" onerror="pass()"> |
<script> |
-// Test that dynamically inserted <link> elements are handled the same way. |
-var link = document.createElement("link"); |
-link.rel = "subresource"; |
-link.crossOrigin = "anonymous"; |
-link.onload = pass; |
-link.onerror = fail; |
-link.href = "http://localhost:8080/security/resources/abe-allow-credentials.php?1"; |
-document.body.appendChild(link); |
+function runTest() |
+{ |
+ // Test that dynamically inserted <link> elements are handled the same way. |
+ var link = document.createElement("link"); |
+ link.rel = "subresource"; |
+ link.crossOrigin = "anonymous"; |
+ link.onload = pass; |
+ link.onerror = fail; |
+ link.href = "http://localhost:8080/security/resources/abe-allow-credentials.php?1"; |
+ document.body.appendChild(link); |
-link = document.createElement("link"); |
-link.rel = "subresource"; |
-link.crossOrigin = "use-credentials"; |
-link.onload = fail; |
-link.onerror = pass; |
-link.href = "http://localhost:8080/security/resources/abe-allow-star.php?1"; |
-document.body.appendChild(link); |
+ link = document.createElement("link"); |
+ link.rel = "subresource"; |
+ link.crossOrigin = "use-credentials"; |
+ link.onload = fail; |
+ link.onerror = pass; |
+ link.href = "http://localhost:8080/security/resources/abe-allow-star.php?1"; |
+ document.body.appendChild(link); |
+} |
+window.onload = runTest; |
</script> |
+</body> |
+</html> |