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

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

Issue 2269073002: Revert of Resolving drawImage issue with canvases that contain bitmap images (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1
2 <!DOCTYPE html>
3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script>
5 <script>
6
7 function testCanvas_0f0(ctx) {
8 var colorData = ctx.getImageData(50, 50, 1, 1).data;
9 assert_equals(colorData[0], 0);
10 assert_equals(colorData[1], 255);
11 assert_equals(colorData[2], 0);
12 assert_equals(colorData[3], 255);
13 }
14
15 function testDrawCanvasWithImageBitamp(image) {
16 var dstCanvas = document.createElement('canvas');
17 dstCanvas.width = dstCanvas.height = 100;
18 var dstCtx = dstCanvas.getContext('bitmaprenderer');
19 dstCtx.transferFromImageBitmap(image);
20
21 var myCanvas = document.createElement('canvas');
22 myCanvas.width = myCanvas.height = 100;
23 var myCtx = myCanvas.getContext('2d');
24 myCtx.drawImage(dstCanvas, 10, 10);
25 testCanvas_0f0(myCtx);
26 }
27
28 promise_test(function() {
29 var canvas = document.createElement('canvas');
30 canvas.width = canvas.height = 100;
31 var ctx = canvas.getContext('2d');
32 ctx.fillStyle = '#0f0';
33 ctx.fillRect(0, 0, 100, 100);
34 testCanvas_0f0(ctx);
35
36 return createImageBitmap(canvas).then(testDrawCanvasWithImageBitamp);
37 }, 'testDrawCanvasWithImageBitamp should not return any error');
38
39 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698