mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 08:45:46 +00:00
3d85eebfd7
MozReview-Commit-ID: 7c62WCJZWMz --HG-- extra : rebase_source : c3f90b2a6e10557cc3c3f01e31aab8e70eca6a39
19 lines
562 B
JavaScript
19 lines
562 B
JavaScript
function testBug1239300() {
|
|
return new Promise(function(resolve, reject) {
|
|
createImageBitmap(new Blob()).then(
|
|
function() {
|
|
ok(false, "The promise should be rejected with InvalidStateError.");
|
|
reject();
|
|
},
|
|
function(result) {
|
|
if (result.name == "InvalidStateError") {
|
|
ok(true, "The promise should be rejected with InvalidStateError.");
|
|
resolve();
|
|
} else {
|
|
ok(false, "The promise should be rejected with InvalidStateError.");
|
|
reject();
|
|
}
|
|
}
|
|
);
|
|
});
|
|
} |