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

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

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 <p>Test that a script element with a crossorigin attribute loads a cross-origin script correctly when the CORS check passes on the response.</p>
2 <pre></pre>
3 <script>
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
7 }
8
9 var result = "FAIL";
10 var have_reported = false;
11 function loaded() {
12 if (!have_reported) {
13 document.querySelector("pre").innerHTML = result;
14 if (window.testRunner)
15 testRunner.notifyDone();
16 have_reported = true;
17 }
18 }
19 </script>
20 <!-- This script should load -->
21 <script crossorigin="anonymous" src="http://localhost:8000/security/resources/co rs-script.php?cors=true&value=PASS" onload="loaded()"></script>
22 <script>loaded();</script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698