Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-stylesheet-reinserted.html |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-stylesheet-reinserted.html b/third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-stylesheet-reinserted.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5c6921a81bed39e84cb3741108aefb1a12bbeba6 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-stylesheet-reinserted.html |
| @@ -0,0 +1,32 @@ |
| +<!DOCTYPE HTML> |
| +<html> |
| +<head> |
| +<script src="/js-test-resources/js-test.js"></script> |
| +<script> |
| +description("Test that re-inserting a CORS-loading stylesheet is correctly handled.") |
| + |
| +function onLoad(event) { |
| + testFailed("non-CORS stylesheet loaded(no assert)"); |
| + finishJSTest(); |
| +} |
| +function onError(event) { |
| + testPassed("non-CORS stylesheet loaded with error(no assert)"); |
| + finishJSTest(); |
| +} |
| +</script> |
| +<script src="resources/link-crossorigin-common.js"></script> |
| +</head> |
| +<body> |
| +<div id="div1"></div> |
| +<div id="div2"></div> |
| +<link id="link1" crossorigin="use-credentials" rel="stylesheet" href="http://127.0.0.1:8080/resources/slow-script.pl?delay=100" onload="onLoad(event)" onerror="onError(event)"> |
| +<script> |
| +function runTest() |
| +{ |
| + div1.appendChild(link1); |
|
Mike West
2015/10/21 14:14:04
Nit: Can you actually grab the element before appe
sof
2015/10/21 15:17:34
Can do that, no prizes for brevity in tests; done.
|
| + div2.appendChild(link1); |
| +} |
| +window.onload = runTest; |
| +</script> |
| +</body> |
| +</html> |