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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events-attached-in-event.html

Issue 2695813009: Import wpt@503f5b5f78ec4e87d144f78609f363f0ed0ea8db (Closed)
Patch Set: Skip some tests Created 3 years, 10 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 <meta charset="utf-8">
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <link rel="help" href="https://html.spec.whatwg.org/#unhandled-promise-rejection s">
6 <script>
7 'use strict';
8 setup({
9 allow_uncaught_exception: true
10 });
11 async_test(function(t) {
12 var e = new Error('e');
13 var p = Promise.reject(e);
14
15 window.onunhandledrejection = function(evt) {
16 t.step(function() {
17 assert_equals(evt.promise, p);
18 assert_equals(evt.reason, e);
19 });
20 var unreached = t.unreached_func('promise should not be fulfilled');
21 p.then(unreached, function(reason) {
22 t.step(function() {
23 assert_equals(reason, e);
24 });
25 t.step_timeout(function() { t.done(); }, 10);
26 });
27 };
28
29 window.onrejectionhandled = t.unreached_func('rejectionhandled event should no t be invoked');
30 }, 'Attaching a handler in unhandledrejection should not trigger rejectionhandle d.');
31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698