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

Side by Side Diff: LayoutTests/http/tests/security/script-crossorigin-fails-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 does not load a cross -origin script when the resource sharing check fails on the response.</p>
2 <pre></pre>
3 <script>
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
7 }
8
9 var result = "PASS";
10
11 function must_not_fire() {
12 result = "FAIL";
13 }
14
15 function finish() {
16 document.querySelector("pre").innerHTML = result;
17 if (window.testRunner)
18 testRunner.notifyDone();
19 }
20 </script>
21 <!-- This script should _not_ load, nor fire onload. -->
22 <script crossorigin="anonymous" src="http://localhost:8000/security/resources/co rs-script.php?cors=false&value=FAIL" onload="must_not_fire()" onerror="finish(); "></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698