OLD | NEW |
1 <script src = "../../../../resources/js-test.js"></script> | 1 <script src = "../../resources/js-test.js"></script> |
2 <script type = "text/javascript"> | 2 <script type = "text/javascript"> |
3 if (window.testRunner) | 3 if (window.testRunner) |
4 { | 4 { |
5 testRunner.dumpAsText(); | 5 testRunner.dumpAsText(); |
6 testRunner.waitUntilDone(); | 6 testRunner.waitUntilDone(); |
7 } | 7 } |
8 | 8 |
9 description("Test if toBlob creates a Blob-type object."); | 9 description("Test if toBlob creates a Blob-type object."); |
10 | 10 |
11 var resultImageObject = null; | 11 var resultImageObject = null; |
12 canvas = document.createElement('canvas'); | 12 canvas = document.createElement('canvas'); |
13 canvas.toBlob(function(b) { | 13 canvas.toBlob(function(b) { |
14 resultImageObject = b; | 14 resultImageObject = b; |
15 shouldBeFalse('resultImageObject instanceof File'); | 15 shouldBeFalse('resultImageObject instanceof File'); |
16 shouldBeTrue('resultImageObject instanceof Blob'); | 16 shouldBeTrue('resultImageObject instanceof Blob'); |
17 if (window.testRunner) | 17 if (window.testRunner) |
18 testRunner.notifyDone(); | 18 testRunner.notifyDone(); |
19 }); | 19 }); |
20 </Script> | 20 </Script> |
OLD | NEW |