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

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

Issue 2838933003: [not-for-commit] kitsune changes + pending kouhei changes (Closed)
Patch Set: Created 3 years, 7 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
2 <!DOCTYPE html>
3 <html>
4 <head>
5 <title>html-script-module-evaluation-error-1</title>
6 <script src="/resources/testharness.js"></script>
7 <script src="/resources/testharnessreport.js"></script>
8 </head>
9 <body>
10 <h1>html-script-module-evaluation-error-1</h1>
11 <script>
12
13 var log = [];
14 setup({allow_uncaught_exception:true});
15
16 var test_load = async_test("test_load");
17 window.addEventListener("load", test_load.step_func_done(ev => {
18 assert_array_equals(log, ["throw"]);
19 }));
20
21 // Note that there is only one error event.
22 var test_error = async_test("test_error");
23 window.addEventListener("error", test_error.step_func_done(ev => {
24 console.log(ev);
25 assert_equals(ev.message, "Uncaught 666");
26 assert_array_equals(log, ["throw"]);
27
28 }));
29
30 function unreachable() {
31 // Insert junk into |log| such that the above |assert_array_equals|
32 // will fail.
33 log.push("junk");
34 }
35
36 </script>
37 <script type="module" src="throw.js" onerror="unreachable()"></script>
38 <script type="module" src="throw.js" onerror="unreachable()"></script>
39 <script type="module" src="throw.js" async onerror="unreachable()"></script>
40 <script type="module" src="throw.js" nomodule onerror="unreachable()"></scri pt>
41 </body>
42 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698