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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-gradient-without-path.js

Issue 2674933002: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Corrections 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-getImageData-negative-source.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 description("Series of tests to ensure that no gradient is drawn without path");
2 var ctx = document.createElement('canvas').getContext('2d');
3
4 ctx.fillStyle = 'green';
5 ctx.fillRect(0, 0, 100, 100);
6
7 var gradient = ctx.createLinearGradient(0, 0, 0, 100);
8 gradient.addColorStop(1, 'red');
9 ctx.fillStyle = gradient;
10
11 ctx.fill();
12
13 var imageData = ctx.getImageData(1, 1, 98, 98);
14 var imgdata = imageData.data;
15 shouldBe("imgdata[4]", "0");
16 shouldBe("imgdata[5]", "128");
17 shouldBe("imgdata[6]", "0");
18
19 ctx.strokeStyle = 'green';
20 ctx.lineWidth = 100;
21 ctx.strokeRect(50, 0, 100, 100);
22
23 ctx.strokeStyle = gradient;
24
25 ctx.stroke();
26
27 imageData = ctx.getImageData(1, 1, 98, 98);
28 imgdata = imageData.data;
29 shouldBe("imgdata[4]", "0");
30 shouldBe("imgdata[5]", "128");
31 shouldBe("imgdata[6]", "0");
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-getImageData-negative-source.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698