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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-video.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
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 from video e lements."); 9 description("Ensure correct behavior of drawImage with ImageBitmaps from video e lements.");
10 window.jsTestIsAsync = true; 10 window.jsTestIsAsync = true;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 Promise.all([p1, p2, p3, p4, p5, p6, p7, p8, p9]).then(function() { 70 Promise.all([p1, p2, p3, p4, p5, p6, p7, p8, p9]).then(function() {
71 checkNoCrop(imageBitmaps.noCrop); 71 checkNoCrop(imageBitmaps.noCrop);
72 checkCrop(imageBitmaps.crop); 72 checkCrop(imageBitmaps.crop);
73 checkCrop(imageBitmaps.cropRight); 73 checkCrop(imageBitmaps.cropRight);
74 checkCrop(imageBitmaps.cropCenter); 74 checkCrop(imageBitmaps.cropCenter);
75 checkOverCrop(imageBitmaps.overCrop); 75 checkOverCrop(imageBitmaps.overCrop);
76 checkOverCropRight(imageBitmaps.overCropRight); 76 checkOverCropRight(imageBitmaps.overCropRight);
77 checkCrop(imageBitmaps.negativeCrop); 77 checkCrop(imageBitmaps.negativeCrop);
78 checkEmpty(imageBitmaps.empty); 78 checkEmpty(imageBitmaps.empty);
79 checkEmpty(imageBitmaps.emptyTwo); 79 checkEmpty(imageBitmaps.emptyTwo);
80 createImageBitmap(video, 0, 0, Math.pow(10, 6), Math.pow(10, 6)).then(fu nction() { 80 createImageBitmap(video, 0, 0, 0x8000, 0x8000).then(function() {
81 testFailed('Creating a huge ImageBitmap is resolved unexpectedly.'); 81 testFailed('Creating a huge ImageBitmap is resolved unexpectedly.');
82 finishJSTest(); 82 finishJSTest();
83 }, function() { 83 }, function() {
84 testPassed('Creating a huge ImageBitmap is rejected as expected.'); 84 testPassed('Creating a huge ImageBitmap is rejected as expected.');
85 finishJSTest(); 85 finishJSTest();
86 }); 86 });
87 }, function() { 87 }, function() {
88 testFailed("Promise was rejected."); 88 testFailed("Promise was rejected.");
89 finishJSTest(); 89 finishJSTest();
90 }); 90 });
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 ctx.drawImage(imageBitmap, 0, 0); 209 ctx.drawImage(imageBitmap, 0, 0);
210 shouldBeClear(10, 10); 210 shouldBeClear(10, 10);
211 shouldBeClear(90, 90); 211 shouldBeClear(90, 90);
212 shouldBeClear(110, 110); 212 shouldBeClear(110, 110);
213 shouldBeClear(210, 210); 213 shouldBeClear(210, 210);
214 } 214 }
215 215
216 </script> 216 </script>
217 </body> 217 </body>
218 </html> 218 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698