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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-transparency-and-composite.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("Series of tests to ensure correct behaviour of composite on a fully transparent color.");
2 var ctx = document.createElement('canvas').getContext('2d');
3
4 ctx.globalCompositeOperation = "source-over";
5 ctx.fillStyle = 'rgba(0,0,0,0)';
6 ctx.fillRect(0,0,100,100);
7
8 ctx.save();
9 ctx.translate(0,100);
10 ctx.scale(1,-1);
11 ctx.fillStyle = 'green';
12 ctx.fillRect(0,0,100,100);
13 ctx.restore();
14
15 var imageData = ctx.getImageData(1, 1, 98, 98);
16 var imgdata = imageData.data;
17 shouldBe("imgdata[4]", "0");
18 shouldBe("imgdata[5]", "128");
19 shouldBe("imgdata[6]", "0");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698