imagebitmap_bug1239300.js (566B)
1 function testBug1239300() { 2 return new Promise(function (resolve, reject) { 3 createImageBitmap(new Blob()).then( 4 function () { 5 ok(false, "The promise should be rejected with InvalidStateError."); 6 reject(); 7 }, 8 function (result) { 9 if (result.name == "InvalidStateError") { 10 ok(true, "The promise should be rejected with InvalidStateError."); 11 resolve(); 12 } else { 13 ok(false, "The promise should be rejected with InvalidStateError."); 14 reject(); 15 } 16 } 17 ); 18 }); 19 }