| 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 | 8 |
| 9 description("Ensure correct behavior of drawImage with ImageBitmaps."); | 9 description("Ensure correct behavior of drawImage with ImageBitmaps."); |
| 10 window.jsTestIsAsync = true; | 10 window.jsTestIsAsync = true; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 Promise.all([p1, p2, p3, p4, p5, p6, p7, p8, p9]).then(function() { | 179 Promise.all([p1, p2, p3, p4, p5, p6, p7, p8, p9]).then(function() { |
| 180 checkNoCrop(imageBitmaps.noCrop); | 180 checkNoCrop(imageBitmaps.noCrop); |
| 181 checkCrop(imageBitmaps.crop); | 181 checkCrop(imageBitmaps.crop); |
| 182 checkCropCenter(imageBitmaps.cropCenter); | 182 checkCropCenter(imageBitmaps.cropCenter); |
| 183 checkCropRight(imageBitmaps.cropRight); | 183 checkCropRight(imageBitmaps.cropRight); |
| 184 checkOverCrop(imageBitmaps.overCrop); | 184 checkOverCrop(imageBitmaps.overCrop); |
| 185 checkOverCropRight(imageBitmaps.overCropRight); | 185 checkOverCropRight(imageBitmaps.overCropRight); |
| 186 checkCrop(imageBitmaps.negativeCrop); | 186 checkCrop(imageBitmaps.negativeCrop); |
| 187 checkEmpty(imageBitmaps.empty); | 187 checkEmpty(imageBitmaps.empty); |
| 188 checkEmpty(imageBitmaps.emptyTwo); | 188 checkEmpty(imageBitmaps.emptyTwo); |
| 189 createImageBitmap(element, 0, 0, Math.pow(10, 6), Math.pow(10, 6)).then(
function() { | 189 createImageBitmap(element, 0, 0, 0x8000, 0x8000).then(function() { |
| 190 testFailed('Creating a huge ImageBitmap is resolved unexpectedly.'); | 190 testFailed('Creating a huge ImageBitmap is resolved unexpectedly.'); |
| 191 finishJSTest(); | 191 finishJSTest(); |
| 192 }, function() { | 192 }, function() { |
| 193 testPassed('Creating a huge ImageBitmap is rejected as expected.'); | 193 testPassed('Creating a huge ImageBitmap is rejected as expected.'); |
| 194 nextCheck(elementIndex + 1); | 194 nextCheck(elementIndex + 1); |
| 195 }); | 195 }); |
| 196 }, shouldNotBeCalled); | 196 }, shouldNotBeCalled); |
| 197 } | 197 } |
| 198 | 198 |
| 199 function checkNoCrop(imageBitmap) { | 199 function checkNoCrop(imageBitmap) { |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 ctx.drawImage(imageBitmap, 0, 0); | 409 ctx.drawImage(imageBitmap, 0, 0); |
| 410 shouldBeClear(1, 1); | 410 shouldBeClear(1, 1); |
| 411 shouldBeClear(9, 9); | 411 shouldBeClear(9, 9); |
| 412 shouldBeClear(11, 11); | 412 shouldBeClear(11, 11); |
| 413 shouldBeClear(22, 22); | 413 shouldBeClear(22, 22); |
| 414 } | 414 } |
| 415 | 415 |
| 416 </script> | 416 </script> |
| 417 </body> | 417 </body> |
| 418 </html> | 418 </html> |
| OLD | NEW |