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

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

Issue 2845983002: [modules] Add several new WPT tests. (Closed)
Patch Set: Move on top of other CL. 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
(Empty)
1 <!DOCTYPE html>
2 <title>Handling of evaluation errors, 4</title>
3
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 <script>
7 setup({allow_uncaught_exception: true});
8
9 window.log = [];
10
11 window.addEventListener("error", ev => log.push(ev.error));
12
13 const test_load = async_test(
14 "Test that exceptions during evaluation lead to error events on " +
15 "window, and that exceptions are remembered.\n");
16 window.addEventListener("load", test_load.step_func_done(ev => {
17 const exn = log[1];
18 assert_array_equals(log, ["throw", exn, exn, exn, exn, exn]);
19 assert_true(exn.foo);
20 }));
21
22 function unreachable() { log.push("unexpected"); }
23 </script>
24 <script type="module" src="./throw-nested.js" onerror="unreachable()"></script>
25 <script type="module" src="./throw-nested.js" onerror="unreachable()"></script>
26 <script type="module" src="./throw.js" onerror="unreachable()"></script>
27 <script type="module" src="./throw-nested.js" onerror="unreachable()"></script>
28 <script type="module" src="./throw.js" onerror="unreachable()"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698