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="../../resources/js-test.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 valid arguments to Canvas::drawIma
ge that use a valid source image."); | 8 description("This test checks behavior of valid arguments to Canvas::drawIma
ge that use a valid source image."); |
9 | 9 |
10 function ExpectedNotEnoughArgumentsMessage(num) { | 10 function ExpectedNotEnoughArgumentsMessage(num) { |
11 return "\"TypeError: Failed to execute 'drawImage' on 'CanvasRenderingCo
ntext2D': 3 arguments required, but only " + num + " present.\""; | 11 return "\"TypeError: Failed to execute 'drawImage' on 'CanvasRenderingCo
ntext2D': 3 arguments required, but only " + num + " present.\""; |
12 } | 12 } |
13 var IndexSizeError = "IndexSizeError: Index or size was negative, or greater
than the allowed value."; | 13 var IndexSizeError = "IndexSizeError: Index or size was negative, or greater
than the allowed value."; |
14 | 14 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 shouldNotThrow("ctx.drawImage(bitmap, 52, 74, -52, -64, 0, 0, 20, 20)"); | 146 shouldNotThrow("ctx.drawImage(bitmap, 52, 74, -52, -64, 0, 0, 20, 20)"); |
147 | 147 |
148 // negative size of source, imageRect does not contain sourceRect on eve
ry side | 148 // negative size of source, imageRect does not contain sourceRect on eve
ry side |
149 shouldNotThrow("ctx.drawImage(bitmap, 62, 74, -72, -84, 0, 0, 20, 20)"); | 149 shouldNotThrow("ctx.drawImage(bitmap, 62, 74, -72, -84, 0, 0, 20, 20)"); |
150 | 150 |
151 finishJSTest(); | 151 finishJSTest(); |
152 } | 152 } |
153 </script> | 153 </script> |
154 </body> | 154 </body> |
155 </html> | 155 </html> |
OLD | NEW |