| 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="../js/resources/js-test-pre.js"></script> | 4 <script src="../js/resources/js-test-pre.js"></script> |
| 5 </head> | 5 </head> |
| 6 <script> | 6 <script> |
| 7 window.jsTestIsAsync = true; | 7 window.jsTestIsAsync = true; |
| 8 description("This test checks behavior of Canvas::drawImage with a broken so
urce image."); | 8 description("This test checks behavior of Canvas::drawImage with a broken so
urce image."); |
| 9 | 9 |
| 10 var InvalidStateError = "InvalidStateError: An attempt was made to use an ob
ject that is not, or is no longer, usable."; | 10 var InvalidStateError = "InvalidStateError: An attempt was made to use an ob
ject that is not, or is no longer, usable."; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 shouldThrow("ctx.drawImage(invalidImage, 0, 0, 20, 20)", "InvalidStateEr
ror"); | 27 shouldThrow("ctx.drawImage(invalidImage, 0, 0, 20, 20)", "InvalidStateEr
ror"); |
| 28 shouldThrow("ctx.drawImage(invalidImage, 0, 0, 20, 20, 0, 0, 20, 20)", "
InvalidStateError"); | 28 shouldThrow("ctx.drawImage(invalidImage, 0, 0, 20, 20, 0, 0, 20, 20)", "
InvalidStateError"); |
| 29 | 29 |
| 30 // InvalidStateError takes precedence over IndexSizeError | 30 // InvalidStateError takes precedence over IndexSizeError |
| 31 shouldThrow("ctx.drawImage(invalidImage, 0, 0, 0, 20)", "InvalidStateErr
or"); | 31 shouldThrow("ctx.drawImage(invalidImage, 0, 0, 0, 20)", "InvalidStateErr
or"); |
| 32 shouldThrow("ctx.drawImage(invalidImage, 0, 0, 0, 20, 0, 0, 20, 20)", "I
nvalidStateError"); | 32 shouldThrow("ctx.drawImage(invalidImage, 0, 0, 0, 20, 0, 0, 20, 20)", "I
nvalidStateError"); |
| 33 | 33 |
| 34 finishJSTest(); | 34 finishJSTest(); |
| 35 } | 35 } |
| 36 </script> | 36 </script> |
| 37 <script src="../js/resources/js-test-post.js"></script> | |
| 38 </body> | 37 </body> |
| 39 </html> | 38 </html> |
| OLD | NEW |