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

Side by Side Diff: LayoutTests/http/tests/security/script-crossorigin-loads-correctly-dual.html

Issue 137983010: (Re)organize handling of CORS access control during resource loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: HTMLImportLoader no longer needs a ResourceFetcher Created 6 years, 11 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
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <p>This test passes if a script resource is loaded twice if asked to fetch it wi th and without CORS enabled.</p>
3 <pre></pre>
4 <!-- Non-CORS enabled script load, supplying credentials. -->
5 <script src="http://localhost:8000/security/resources/cors-script.php?cors=true& credentials=true&value=1&value_cors=2"></script>
6 <script>
7 if (window.testRunner) {
8 testRunner.dumpAsText();
9 testRunner.waitUntilDone();
10 }
11
12 var expected = "12";
13
14 // Copy the 'result' value set by external script.
15 var outcome = result;
16 </script>
17 <!-- CORS enabled script load, supplying credentials. Should not re-use above ca ched script, as response will differ. -->
18 <script crossorigin="use-credentials" src="http://localhost:8000/security/resour ces/cors-script.php?cors=true&credentials=true&value=1&value_cors=2"></script>
19 <script>
20 outcome += result;
21 document.querySelector("pre").innerHTML = outcome === expected ? "PASS" : "FAIL" ;
22 if (window.testRunner)
23 testRunner.notifyDone();
24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698