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

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

Issue 2690183006: 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 that stroke() paints nothing on canvas wh en the strokeStyle is set to a zero-size gradient.");
2 var ctx = document.createElement('canvas').getContext('2d');
3
4 ctx.fillStyle = '#0f0';
5 ctx.fillRect(0, 0, 1, 1);
6
7 var g = ctx.createLinearGradient(0, 0, 0, 0); // zero-length line (undefined dir ection);
8 g.addColorStop(0, '#f00');
9 g.addColorStop(1, '#f00');
10 ctx.strokeStyle = g;
11 ctx.rect(0, 0, 1 ,1);
12 ctx.stroke();
13
14 var imageData = ctx.getImageData(0, 0, 1, 1);
15 var imgdata = imageData.data;
16 shouldBe("imgdata[0]", "0");
17 shouldBe("imgdata[1]", "255");
18 shouldBe("imgdata[2]", "0");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698