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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-to-canvas.js

Issue 2693043012: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Addressing comments Created 3 years, 10 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
(Empty)
1 description("Test to ensure that canvas-to-canvas drawImage after a stroked rect works correctly.");
2 var canvas = document.createElement('canvas');
3 var ctx = canvas.getContext('2d');
4
5 ctx.lineWidth = 10;
6 ctx.beginPath();
7 ctx.strokeStyle = 'green';
8 ctx.strokeRect(0, 0, 100, 100);
9
10 var ctx2 = document.createElement('canvas').getContext('2d');
11
12 ctx2.fillStyle = 'red';
13 ctx2.fillRect(0, 0, 100, 100);
14 ctx2.drawImage(canvas, 0, 0);
15 var imageData = ctx2.getImageData(0, 0, 1, 1);
16 var imgdata = imageData.data;
17 shouldBe("imgdata[0]", "0");
18 shouldBe("imgdata[1]", "128");
19 shouldBe("imgdata[2]", "0");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698