Auto merge of #22149 - CYBAI:rejectionhandled, r=jdm

Implement rejectionhandled event

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22006 .
- [x] There are more tests `PASS`ed for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22149)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-11-15 16:51:30 -05:00 committed by GitHub
commit 24cb7491d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 42 additions and 32 deletions

View file

@ -625710,7 +625710,7 @@
"testharness"
],
"html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events-onerror.html": [
"c76d531c43ec3ecc8cbf3c21f3a0ffa4db7be715",
"b6f6d63e0aa9660909c93e7366f80f4f36c97ecf",
"testharness"
],
"html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.dedicatedworker.html": [

View file

@ -1,6 +0,0 @@
[promise-rejection-events-onerror.html]
type: testharness
expected: TIMEOUT
[Throwing inside an unhandledrejection handler invokes the error handler.]
expected: TIMEOUT

View file

@ -1,6 +0,0 @@
[promise-rejection-events.html]
type: testharness
expected: TIMEOUT
[rejectionhandled is dispatched from a queued task, and not immediately]
expected: TIMEOUT

View file

@ -15,7 +15,7 @@ async_test(function(t) {
window.onerror = function (msg, url, line, col, error) {
t.step(function() {
assert_equals(msg, 'Uncaught Error: e2');
assert_true(msg.includes('e2'));
assert_equals(error, e2);
});
t.done();