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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-webkitLineDash.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("Basic test for webkitLineDash and webkitLineDashOffset");
2
3 var canvas = document.createElement('canvas');
4 document.body.appendChild(canvas);
5 canvas.setAttribute('width', '700');
6 canvas.setAttribute('height', '700');
7 var ctx = canvas.getContext('2d');
8
9 // Verify default values.
10 shouldBe('ctx.webkitLineDashOffset', '0');
11
12 // Set dash-style.
13 ctx.webkitLineDash = [15, 10];
14 ctx.webkitLineDashOffset = 5;
15 ctx.strokeRect (10,10,100,100);
16
17 // Verify dash and offset.
18 var lineDash;
19 lineDash = ctx.webkitLineDash;
20 shouldBe('lineDash[0]', '15');
21 shouldBe('lineDash[1]', '10');
22 shouldBe('ctx.webkitLineDashOffset', '5');
23
24 // Verify that line dash offset persists after
25 // clearRect (which causes a save/restore of the context
26 // state to the stack).
27 ctx.clearRect(0, 0, 700, 700);
28 shouldBe('ctx.webkitLineDashOffset', '5');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698