mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Add a simple API to reject promises with DOM error values.
This commit is contained in:
parent
ae81ab3972
commit
27d44c8d10
5 changed files with 35 additions and 2 deletions
|
@ -21,6 +21,13 @@
|
|||
});
|
||||
}, 'Reject callback gets argument');
|
||||
|
||||
promise_test(function(test) {
|
||||
var t = new TestBinding;
|
||||
var p = new Promise(function() {});
|
||||
t.promiseRejectWithTypeError(p, "success");
|
||||
return promise_rejects(test, new TypeError("success"), p, "TypeError should be instantiated");
|
||||
}, 'Native code rejects with exception');
|
||||
|
||||
promise_test(function(test) {
|
||||
var t = new TestBinding;
|
||||
var resolved;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue