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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/crossorigin.html

Issue 2914273002: Fix crossorigin script module test assertions (Closed)
Patch Set: Created 3 years, 6 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
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>html-script-module-crossOrigin</title> 4 <title>html-script-module-crossOrigin</title>
5 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/testharnessreport.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <h1>html-script-module-crossOrigin</h1> 9 <h1>html-script-module-crossOrigin</h1>
10 <iframe id="root-WithCORS" src="crossorigin-root-same.sub.html"></iframe>
10 <iframe id="root-NoCORS" src="crossorigin-root-different.sub.html"></iframe> 11 <iframe id="root-NoCORS" src="crossorigin-root-different.sub.html"></iframe>
11 <iframe id="root-WithCORS" src="crossorigin-root-same.sub.html"></iframe>
12 <iframe id="root-BlockedMissingHeader" src="crossorigin-root-missingheader.s ub.html"></iframe> 12 <iframe id="root-BlockedMissingHeader" src="crossorigin-root-missingheader.s ub.html"></iframe>
13 <iframe id="root-BlockedWrongHeader" src="crossorigin-root-wrongheader.sub.h tml"></iframe> 13 <iframe id="root-BlockedWrongHeader" src="crossorigin-root-wrongheader.sub.h tml"></iframe>
14 <iframe id="import-WithCORS" src="crossorigin-import-same.sub.html"></iframe >
14 <iframe id="import-NoCORS" src="crossorigin-import-different.sub.html"></ifr ame> 15 <iframe id="import-NoCORS" src="crossorigin-import-different.sub.html"></ifr ame>
15 <iframe id="import-WithCORS" src="crossorigin-import-same.sub.html"></iframe >
16 <iframe id="import-BlockedMissingHeader" src="crossorigin-import-missinghead er.sub.html"></iframe> 16 <iframe id="import-BlockedMissingHeader" src="crossorigin-import-missinghead er.sub.html"></iframe>
17 <iframe id="import-BlockedWrongHeader" src="crossorigin-import-wrongheader.s ub.html"></iframe> 17 <iframe id="import-BlockedWrongHeader" src="crossorigin-import-wrongheader.s ub.html"></iframe>
18 <script> 18 <script>
19 19
20 var tests = [ 20 var tests = [
21 { "obj": async_test("Root module, Error in CORS-different-origin script"), "id": "root-NoCORS", "expected": "running,0-0" },
22 { "obj": async_test("Root module, Error in CORS-same-origin scri pt"), "id": "root-WithCORS", "expected": "running,8-1" }, 21 { "obj": async_test("Root module, Error in CORS-same-origin scri pt"), "id": "root-WithCORS", "expected": "running,8-1" },
23 { "obj": async_test("Root module, Blocked script download, missi ng CORS ACAO header"), "id": "root-BlockedMissingHeader", "expected": "error" }, 22 { "obj": async_test("Root module, Blocked script download, missi ng CORS ACAO header"), "id": "root-NoCORS", "expected": "error" },
23 { "obj": async_test("Root module, Blocked script download, cross origin attribute with missing CORS ACAO header"), "id": "root-BlockedMissingHead er", "expected": "error" },
24 { "obj": async_test("Root module, Blocked script download, misma tched CORS ACAO header"), "id": "root-BlockedWrongHeader", "expected": "error" } , 24 { "obj": async_test("Root module, Blocked script download, misma tched CORS ACAO header"), "id": "root-BlockedWrongHeader", "expected": "error" } ,
25 { "obj": async_test("Imported module, Error in CORS-different-or igin script"), "id": "import-NoCORS", "expected": "running,0-0" },
26 { "obj": async_test("Imported module, Error in CORS-same-origin script"), "id": "import-WithCORS", "expected": "running,8-1" }, 25 { "obj": async_test("Imported module, Error in CORS-same-origin script"), "id": "import-WithCORS", "expected": "running,8-1" },
27 { "obj": async_test("Imported module, Blocked script download, m issing CORS ACAO header"), "id": "import-BlockedMissingHeader", "expected": "err or" }, 26 { "obj": async_test("Imported module, Blocked script download, m issing CORS ACAO header"), "id": "import-NoCORS", "expected": "error" },
27 { "obj": async_test("Imported module, Blocked script download, c rossorigin attribute with missing CORS ACAO header"), "id": "import-BlockedMissi ngHeader", "expected": "error" },
28 { "obj": async_test("Imported module, Blocked script download, m ismatched CORS ACAO header"), "id": "import-BlockedWrongHeader", "expected": "er ror" }, 28 { "obj": async_test("Imported module, Blocked script download, m ismatched CORS ACAO header"), "id": "import-BlockedWrongHeader", "expected": "er ror" },
29 ]; 29 ];
30 30
31 window.addEventListener("load", function () { 31 window.addEventListener("load", function () {
32 tests.forEach(function (test) { 32 tests.forEach(function (test) {
33 var target = document.getElementById(test.id); 33 var target = document.getElementById(test.id);
34 test.obj.step(function () { 34 test.obj.step(function () {
35 assert_equals(target.contentDocument._log, test.expected, "U nexpected _log value"); 35 assert_equals(target.contentDocument._log, test.expected, "U nexpected _log value");
36 }); 36 });
37 test.obj.done(); 37 test.obj.done();
38 }); 38 });
39 }); 39 });
40 40
41 </script> 41 </script>
42 </body> 42 </body>
43 </html> 43 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698