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