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

Unified Diff: LayoutTests/http/tests/security/link-crossorigin-stylesheet-import-credentials.html

Issue 1011103002: Allow cross-origin cssRules access to CORS-fetched stylesheet. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: compile fix.. Created 5 years, 9 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
Index: LayoutTests/http/tests/security/link-crossorigin-stylesheet-import-credentials.html
diff --git a/LayoutTests/http/tests/security/link-crossorigin-stylesheet-use-credentials.html b/LayoutTests/http/tests/security/link-crossorigin-stylesheet-import-credentials.html
similarity index 62%
copy from LayoutTests/http/tests/security/link-crossorigin-stylesheet-use-credentials.html
copy to LayoutTests/http/tests/security/link-crossorigin-stylesheet-import-credentials.html
index ed6305c43b47acd3777cea8e0b558afd866ecf39..4d91e21509a4765b3abcb4e53b0b3a5b6dc83b52 100644
--- a/LayoutTests/http/tests/security/link-crossorigin-stylesheet-use-credentials.html
+++ b/LayoutTests/http/tests/security/link-crossorigin-stylesheet-import-credentials.html
@@ -3,13 +3,13 @@
<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.")
+description("Test that CORS-fetched stylesheets (crossorigin=use-credentials) handle @import as expected.");
+
+window.testCount = 3;
</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()">
+<link crossorigin="use-credentials" rel="stylesheet" href="http://localhost:8080/security/resources/green-background-allow-credentials-import.php?1" onload="pass(event)" onerror="fail(event)">
<script>
function runTest()
{
@@ -19,15 +19,15 @@ function runTest()
link.crossOrigin = "use-credentials";
link.onload = pass;
link.onerror = fail;
- link.href = "http://localhost:8080/security/resources/green-background-allow-credentials.php";
+ link.href = "http://localhost:8000/security/resources/green-background-allow-credentials-import.php?2";
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";
+ link.onload = pass;
+ link.onerror = fail;
+ link.href = "http://localhost:8080/security/resources/green-background-allow-credentials-import.php?3";
document.body.appendChild(link);
}
window.onload = runTest;

Powered by Google App Engine
This is Rietveld 408576698