| OLD | NEW |
| 1 description("Test the behavior of CanvasRenderingContext2D.drawImage() when call
ed with different numbers of arguments."); | 1 description("Test the behavior of CanvasRenderingContext2D.drawImage() when call
ed with different numbers of arguments."); |
| 2 | 2 |
| 3 var ctx = document.createElement('canvas').getContext('2d'); | 3 var ctx = document.createElement('canvas').getContext('2d'); |
| 4 | 4 |
| 5 var TypeError = "TypeError: Type error"; | 5 var TypeError = "TypeError: Type error"; |
| 6 var TypeErrorNotEnoughArguments = "TypeError: Not enough arguments"; | 6 var TypeErrorNotEnoughArguments = "TypeError: Not enough arguments"; |
| 7 | 7 |
| 8 var imageElement = document.createElement("img"); | 8 var imageElement = document.createElement("img"); |
| 9 shouldThrow("ctx.drawImage()", "TypeErrorNotEnoughArguments"); | 9 shouldThrow("ctx.drawImage()", "TypeErrorNotEnoughArguments"); |
| 10 shouldThrow("ctx.drawImage(imageElement)", "TypeErrorNotEnoughArguments"); | 10 shouldThrow("ctx.drawImage(imageElement)", "TypeErrorNotEnoughArguments"); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 var canvasElement = document.createElement("canvas"); | 22 var canvasElement = document.createElement("canvas"); |
| 23 shouldThrow("ctx.drawImage(canvasElement)", "TypeErrorNotEnoughArguments"); | 23 shouldThrow("ctx.drawImage(canvasElement)", "TypeErrorNotEnoughArguments"); |
| 24 shouldThrow("ctx.drawImage(canvasElement, 0)", "TypeErrorNotEnoughArguments"); | 24 shouldThrow("ctx.drawImage(canvasElement, 0)", "TypeErrorNotEnoughArguments"); |
| 25 shouldBe("ctx.drawImage(canvasElement, 0, 0)", "undefined"); | 25 shouldBe("ctx.drawImage(canvasElement, 0, 0)", "undefined"); |
| 26 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0)", "TypeError"); | 26 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0)", "TypeError"); |
| 27 shouldBe("ctx.drawImage(canvasElement, 0, 0, 0, 0)", "undefined"); | 27 shouldBe("ctx.drawImage(canvasElement, 0, 0, 0, 0)", "undefined"); |
| 28 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0)", "TypeError"); | 28 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0)", "TypeError"); |
| 29 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0)", "TypeError"); | 29 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0)", "TypeError"); |
| 30 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0)", "TypeError"); | 30 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0)", "TypeError"); |
| 31 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0)", "'Error: Ind
exSizeError: DOM Exception 1'"); | 31 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0)", "'IndexSizeE
rror: Index or size was negative, or greater than the allowed value.'"); |
| 32 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeErro
r"); | 32 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeErro
r"); |
| 33 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeE
rror"); | 33 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeE
rror"); |
| OLD | NEW |