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

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

Issue 984213002: CORS errors print error twice on preload. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added delay to cors-script.php Created 5 years, 9 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/preload-script-crossorigin-fails-cross-origin-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 <!-- Regression test for https://crbug.com/464876. On a CORS failure, multiple
3 error messages should not be logged, even if preload occurs. -->
4 <head>
5 </head>
6
7 <script src="/js-test-resources/js-test.js"></script>
8
9 <script>
10 window.jsTestIsAsync = true;
11 description('Preload of script with CORS failure only shows one error');
12
13 var result = "PASS";
14
15 var scriptLoad = function() {
16 testFailed('Script loaded.');
17 };
18
19 var scriptError = function() {
20 if (result === 'PASS')
21 testPassed('Script error.');
22 else
23 testFailed('Script ran.');
24 finishJSTest();
25 };
26
27 var checkForPreload = function(url) {
28 if (internals.isPreloaded(url))
29 testPassed("Did preload.");
30 };
31 </script>
32
33 <!-- Force a preload -->
34 <script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=100"></script>
35 <script>
36 checkForPreload("http://localhost:8000/security/resources/cors-script.php?delay= 100&cors=false&value=FAIL");
37 </script>
38 <script crossorigin="anonymous" src="http://localhost:8000/security/resources/co rs-script.php?delay=100&cors=false&value=FAIL" onload="scriptLoad()" onerror="sc riptError();"></script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/preload-script-crossorigin-fails-cross-origin-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698