| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script> | 7 <script> |
| 8 description("Ensure correct behavior of createImageBitmap for invalid inputs."); | 8 description("Ensure correct behavior of createImageBitmap for invalid inputs."); |
| 9 window.jsTestIsAsync = true; | 9 window.jsTestIsAsync = true; |
| 10 | 10 |
| 11 var InvalidStateError = "InvalidStateError: An attempt was made to use an object
that is not, or is no longer, usable."; | 11 var InvalidStateError = "InvalidStateError: An attempt was made to use an object
that is not, or is no longer, usable."; |
| 12 var TypeError = "TypeError: Type error"; | 12 var TypeError = "TypeError: Failed to execute 'createImageBitmap' on 'Window': N
o function was found that matched the signature provided."; |
| 13 var IndexSizeError = "IndexSizeError: Index or size was negative, or greater tha
n the allowed value."; | 13 var IndexSizeError = "IndexSizeError: Index or size was negative, or greater tha
n the allowed value."; |
| 14 | 14 |
| 15 var image; | 15 var image; |
| 16 var testBitmap; // an ImageBitmap that is uncropped. We use this to test createI
mageBitmap(testBitmap) | 16 var testBitmap; // an ImageBitmap that is uncropped. We use this to test createI
mageBitmap(testBitmap) |
| 17 var d; // image.imageData | 17 var d; // image.imageData |
| 18 var blob; | 18 var blob; |
| 19 var invalidBlob; | 19 var invalidBlob; |
| 20 | 20 |
| 21 // Draw to an auxillary canvas. | 21 // Draw to an auxillary canvas. |
| 22 var aCanvas = document.createElement("canvas"); | 22 var aCanvas = document.createElement("canvas"); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 }, function() { | 116 }, function() { |
| 117 testPassed("createImageBitmap(invalidBlob) was rejected."); | 117 testPassed("createImageBitmap(invalidBlob) was rejected."); |
| 118 finishJSTest(); | 118 finishJSTest(); |
| 119 }); | 119 }); |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 | 122 |
| 123 </script> | 123 </script> |
| 124 </body> | 124 </body> |
| 125 </html> | 125 </html> |
| OLD | NEW |