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

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

Issue 2183323003: Implement resize option for createImageBitmap from ImageData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 4 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/Source/core/frame/ImageBitmap.cpp » ('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> 1 <!DOCTYPE HTML>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script> 4 <script>
5 function checkNoCrop(imageBitmap) 5 function checkNoCrop(imageBitmap)
6 { 6 {
7 var canvas = document.createElement("canvas"); 7 var canvas = document.createElement("canvas");
8 canvas.width = 50; 8 canvas.width = 50;
9 canvas.height = 50; 9 canvas.height = 50;
10 var ctx = canvas.getContext("2d"); 10 var ctx = canvas.getContext("2d");
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 image.src = 'resources/pattern.png' 142 image.src = 'resources/pattern.png'
143 }).then(testImageBitmap); 143 }).then(testImageBitmap);
144 }, 'createImageBitmap from a HTMLImageElement with resize option.'); 144 }, 'createImageBitmap from a HTMLImageElement with resize option.');
145 145
146 // ImageBitmap 146 // ImageBitmap
147 promise_test(function() { 147 promise_test(function() {
148 var testCanvas = initializeTestCanvas(); 148 var testCanvas = initializeTestCanvas();
149 return createImageBitmap(testCanvas).then(testImageBitmap); 149 return createImageBitmap(testCanvas).then(testImageBitmap);
150 }, 'createImageBitmap from an ImageBitmap with resize option.'); 150 }, 'createImageBitmap from an ImageBitmap with resize option.');
151
152 // ImageData
153 promise_test(function() {
154 var canvas = initializeTestCanvas();
155 var ctx = canvas.getContext("2d");
156 var data = ctx.getImageData(0, 0, 20, 20);
157 return testImageBitmap(data);
158 }, 'createImageBitmap from an ImageData with resize option.');
151 </script> 159 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/ImageBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698