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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/path-objects/2d.path.stroke.skew.worker.js

Issue 2553473002: Add offscreen-canvas to the list of wpt directories to skip. (Closed)
Patch Set: Created 4 years 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 // DO NOT EDIT! This test has been generated by tools/gentest.py.
2 // OffscreenCanvas test in a worker:2d.path.stroke.skew
3 // Description:Strokes lines are skewed by the current transformation matrix
4 // Note:
5
6 importScripts("/resources/testharness.js");
7 importScripts("/common/canvas-tests.js");
8
9 var t = async_test("Strokes lines are skewed by the current transformation matri x");
10 t.step(function() {
11
12 var offscreenCanvas = new OffscreenCanvas(100, 50);
13 var ctx = offscreenCanvas.getContext('2d');
14
15 ctx.fillStyle = '#f00';
16 ctx.fillRect(0, 0, 100, 50);
17 ctx.save();
18 ctx.beginPath();
19 ctx.moveTo(49, -50);
20 ctx.lineTo(201, -50);
21 ctx.rotate(Math.PI/4);
22 ctx.scale(1, 283);
23 ctx.strokeStyle = '#0f0';
24 ctx.stroke();
25 ctx.restore();
26 ctx.save();
27 ctx.beginPath();
28 ctx.translate(-150, 0);
29 ctx.moveTo(49, -50);
30 ctx.lineTo(199, -50);
31 ctx.rotate(Math.PI/4);
32 ctx.scale(1, 142);
33 ctx.strokeStyle = '#f00';
34 ctx.stroke();
35 ctx.restore();
36 ctx.save();
37 ctx.beginPath();
38 ctx.translate(-150, 0);
39 ctx.moveTo(49, -50);
40 ctx.lineTo(199, -50);
41 ctx.rotate(Math.PI/4);
42 ctx.scale(1, 142);
43 ctx.strokeStyle = '#f00';
44 ctx.stroke();
45 ctx.restore();
46 _assertPixel(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255");
47 _assertPixel(offscreenCanvas, 50,0, 0,255,0,255, "50,0", "0,255,0,255");
48 _assertPixel(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255");
49 _assertPixel(offscreenCanvas, 0,25, 0,255,0,255, "0,25", "0,255,0,255");
50 _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
51 _assertPixel(offscreenCanvas, 99,25, 0,255,0,255, "99,25", "0,255,0,255");
52 _assertPixel(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255");
53 _assertPixel(offscreenCanvas, 50,49, 0,255,0,255, "50,49", "0,255,0,255");
54 _assertPixel(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255");
55
56 t.done();
57
58 });
59 done();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698