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

Side by Side Diff: LayoutTests/http/tests/security/script-crossorigin-loads-cross-origin-2.xhtml

Issue 47923008: Block execution of failed 'crossorigin' <script>s. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 7 years, 1 month 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
OLDNEW
(Empty)
1 <?xml version="1.0"?>
2 <html xmlns='http://www.w3.org/1999/xhtml'>
3 <head>
4 <title>crossorigin and XHTML</title>
5 </head>
6 <body>
7 <p>In an XHTML document, test that a script element with a crossorigin attribute loads a cross-origin script correctly when the CORS check passes on the respons e.</p>
8 <pre></pre>
9 <script><![CDATA[
10 if (window.testRunner) {
11 testRunner.dumpAsText();
12 testRunner.waitUntilDone();
13 }
14
15 var result = "FAIL";
16 var have_reported = false;
17 function loaded() {
18 if (!have_reported) {
19 document.querySelector("pre").innerHTML = result;
20 if (window.testRunner)
21 testRunner.notifyDone();
22 have_reported = true;
23 }
24 }
25 ]]></script>
26 <!-- This script should load -->
27 <script crossorigin="anonymous" src="http://localhost:8000/security/resources/co rs-script.php?cors=true&amp;&amp;value=PASS"></script>
28 <script><![CDATA[loaded();]]></script>
29 </body>
30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698