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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-closePath-single-point.js

Issue 2675763005: 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 the behavior of closePath on a path with a single point");
2 var ctx = document.createElement('canvas').getContext('2d');
3
4 document.body.appendChild(ctx.canvas);
5
6 ctx.strokeStyle = '#f00';
7 ctx.lineWidth = 20;
8
9 ctx.fillStyle = '#0f0';
10 ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);
11
12 ctx.beginPath();
13 ctx.moveTo(10, 10);
14 ctx.lineTo(100, 100);
15 ctx.closePath();
16 ctx.stroke();
17
18 var imageData = ctx.getImageData(0, 0, 1, 1);
19 var imgdata = imageData.data;
20 shouldBe("imgdata[0]", "0");
21 shouldBe("imgdata[1]", "255");
22 shouldBe("imgdata[2]", "0");
23 shouldBe("imgdata[3]", "255");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698