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

Side by Side Diff: LayoutTests/http/tests/security/img-crossorigin-no-credentials-prompt.html

Issue 450263002: Test <img crossorigin> handling of 401 responses. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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/img-crossorigin-no-credentials-prompt-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <script src="/js-test-resources/js-test.js"></script>
3 <script>
4 description("No credentials should be prompted for on seeing a 401 for &lt;img c rossorigin&gt;.");
5
6 window.jsTestIsAsync = true;
7 if (window.testRunner)
8 testRunner.dumpAsText();
9
10 var testCount = 2;
11
12 function finish() {
13 if (--testCount == 0)
14 finishJSTest();
15 }
16
17 function pass() {
18 testPassed("Non-CORS image resource failed to load");
19 finish();
20 }
21 function fail(mode) {
22 testFailed("Expected cross-origin access check failure for crossorigin='" + mode + "' CORS fetch.");
23 finish();
24 }
25 </script>
26 <img src="http://localhost:8000/security/resources/img-basic-auth.php?uid=41532" crossorigin="anonymous" onload="fail('anonymous')" onerror="pass()">
27 <img src="http://localhost:8000/security/resources/img-basic-auth.php?uid=41533" crossorigin="use-credentials" onload="fail('use-credentials')" onerror="pass()" >
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/img-crossorigin-no-credentials-prompt-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698