Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1030)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html

Issue 2249853008: Reject createImageBitmap promise when the cropRect or resize is too big (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update tests Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-video.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-video.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698