/* global verifyPromiseGlobal, expectedExceptionGlobal */
var label = "parent";
function testThrownException(global) { var p = global.TestFunctions.throwToRejectPromise();
verifyPromiseGlobal(p, global, "throwToRejectPromise return value"); return p
.then(() => {})
.catch(err => { var expected = expectedExceptionGlobal(global);
is(
SpecialPowers.unwrap(SpecialPowers.Cu.getGlobalForObject(err)),
expected, "Should have an exception object from the right global too"
);
ok(
err instanceof expected.DOMException, "Should have a DOMException here"
);
is(
Object.getPrototypeOf(err),
expected.DOMException.prototype, "Should have a DOMException from the right global"
);
is(err.name, "InvalidStateError", "Should have the right DOMException");
});
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.