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

Side by Side Diff: LayoutTests/http/tests/security/link-crossorigin-stylesheet-anonymous.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 unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/link-crossorigin-stylesheet-import-anonymous.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="/js-test-resources/js-test.js"></script> 4 <script src="/js-test-resources/js-test.js"></script>
5 <script> 5 <script>
6 description("Test that a linked stylesheet with a crossorigin=anonymous attribut e loads a CORS enabled resource."); 6 description("Test that a linked stylesheet with a crossorigin=anonymous attribut e loads a CORS enabled resource.");
7 </script> 7 </script>
8 <script src="resources/link-crossorigin-common.js"></script> 8 <script src="resources/link-crossorigin-common.js"></script>
9 </head> 9 </head>
10 <link crossorigin="anonymous" rel="stylesheet" href="http://localhost:8080/secur ity/resources/green-background-allow-star.php" onload="pass()" onerror="fail()"> 10 <link crossorigin="anonymous" rel="stylesheet" href="http://localhost:8080/secur ity/resources/green-background-allow-star.php" onload="pass(event)" onerror="fai l(event)">
11 <link crossorigin="anonymous" rel="stylesheet" href="http://localhost:8080/secur ity/resources/green-background-allow-credentials.php" onload="pass()" onerror="f ail()"> 11 <link crossorigin="anonymous" rel="stylesheet" href="http://localhost:8080/secur ity/resources/green-background-allow-credentials.php" onload="pass(event)" onerr or="fail(event)">
12 <script> 12 <script>
13 function runTest() 13 function runTest()
14 { 14 {
15 // Test that dynamically inserted <link> elements are handled the same way. 15 // Test that dynamically inserted <link> elements are handled the same way.
16 var link = document.createElement("link"); 16 var link = document.createElement("link");
17 link.rel = "stylesheet"; 17 link.rel = "stylesheet";
18 link.crossOrigin = "anonymous"; 18 link.crossOrigin = "anonymous";
19 link.onload = pass; 19 link.onload = pass;
20 link.onerror = fail; 20 link.onerror = fail;
21 link.href = "http://localhost:8080/security/resources/green-background-allow -star.php"; 21 link.href = "http://localhost:8080/security/resources/green-background-allow -star.php";
22 document.body.appendChild(link); 22 document.body.appendChild(link);
23 23
24 link = document.createElement("link"); 24 link = document.createElement("link");
25 link.rel = "stylesheet"; 25 link.rel = "stylesheet";
26 link.crossOrigin = "use-credentials"; 26 link.crossOrigin = "use-credentials";
27 link.onload = pass; 27 link.onload = pass;
28 link.onerror = fail; 28 link.onerror = fail;
29 link.href = "http://localhost:8080/security/resources/green-background-allow -credentials.php"; 29 link.href = "http://localhost:8080/security/resources/green-background-allow -credentials.php";
30 document.body.appendChild(link); 30 document.body.appendChild(link);
31 } 31 }
32 window.onload = runTest; 32 window.onload = runTest;
33 </script> 33 </script>
34 </body> 34 </body>
35 </html> 35 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/link-crossorigin-stylesheet-import-anonymous.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698