Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(998)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-stylesheet-reinserted.html

Issue 1413563005: Reset CORS status upon re-initiating fetch of a stylesheet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adjust test a bit Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-stylesheet-reinserted-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..10c24ea4f8535f27f7323d435456c7b2e41be783
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-stylesheet-reinserted.html
@@ -0,0 +1,36 @@
+<!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()
+{
+ var div1 = document.getElementById("div1");
+ var div2 = document.getElementById("div2");
+ var link1 = document.getElementById("link1");
+
+ div1.appendChild(link1);
+ div2.appendChild(link1);
+}
+window.onload = runTest;
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-stylesheet-reinserted-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698