Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / promise-rejection-events-onerror.html
blob43c17e5ef511a1ad867b94c9bf0d6e78cd9f6416
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6 'use strict';
7 setup({
8 allow_uncaught_exception: true
9 });
10 async_test(function(t) {
11 var e = new Error('e');
12 var e2 = new Error('e2');
13 window.onerror = function (msg, url, line, col, error) {
14 t.step(function() {
15 assert_equals(msg, 'Uncaught Error: e2');
16 assert_equals(error, e2);
17 });
18 t.done();
20 window.onrejectionhandled = function() {
21 throw e2;
23 var p = Promise.reject(e);
24 setTimeout(function() {
25 try {
26 p.catch(function() {});
27 } catch (e) {
28 assert_unreached('attaching a handler should not throw an error');
30 }, 1);
31 }, 'Throwing inside an unhandledrejection handler invokes the error handler.');
32 </script>