summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/imagebitmap_bug1239300.js
blob: 58af7cd0e82edda0830d4e7bc04220e97889f733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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();
        }
      }
    );
  });
}