1 /* Any copyright is dedicated to the Public Domain.
2 * http://creativecommons.org/publicdomain/zero/1.0/ */
6 setExpectedFailuresForSelfTest(4);
8 async function rejectOnNextTick(error) {
9 await Promise.resolve();
11 Promise.reject(error);
14 add_task(async function failWithoutError() {
15 await rejectOnNextTick(undefined);
18 add_task(async function failWithString() {
19 await rejectOnNextTick("This is a string");
22 add_task(async function failWithInt() {
23 await rejectOnNextTick(42);
26 // This one should display a stack trace
27 add_task(async function failWithError() {
28 await rejectOnNextTick(new Error("This is an error"));