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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/path-objects/2d.path.arc.scale.1.html

Issue 2550713004: Import wpt@5915964199b07226bf6d8fbb177a63b1f272907a (Closed)
Patch Set: Modify TestExpectations or download new baselines for tests. 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 <!DOCTYPE html>
2 <!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
3 <title>OffscreenCanvas test: 2d.path.arc.scale.1</title>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 <script src="/common/canvas-tests.js"></script>
7
8 <h1>2d.path.arc.scale.1</h1>
9 <p class="desc">Non-uniformly scaled arcs are the right shape</p>
10
11
12 <script>
13 var t = async_test("Non-uniformly scaled arcs are the right shape");
14 t.step(function() {
15
16 var offscreenCanvas = new OffscreenCanvas(100, 50);
17 var ctx = offscreenCanvas.getContext('2d');
18
19 ctx.fillStyle = '#f00';
20 ctx.fillRect(0, 0, 100, 50);
21 ctx.scale(2, 0.5);
22 ctx.fillStyle = '#0f0';
23 ctx.beginPath();
24 ctx.arc(25, 50, 56, 0, 2*Math.PI, false);
25 ctx.fill();
26 ctx.fillStyle = '#f00';
27 ctx.beginPath();
28 ctx.moveTo(-25, 50);
29 ctx.arc(-25, 50, 24, 0, 2*Math.PI, false);
30 ctx.moveTo(75, 50);
31 ctx.arc(75, 50, 24, 0, 2*Math.PI, false);
32 ctx.moveTo(25, -25);
33 ctx.arc(25, -25, 24, 0, 2*Math.PI, false);
34 ctx.moveTo(25, 125);
35 ctx.arc(25, 125, 24, 0, 2*Math.PI, false);
36 ctx.fill();
37 _assertPixel(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255");
38 _assertPixel(offscreenCanvas, 50,0, 0,255,0,255, "50,0", "0,255,0,255");
39 _assertPixel(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255");
40 _assertPixel(offscreenCanvas, 0,25, 0,255,0,255, "0,25", "0,255,0,255");
41 _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
42 _assertPixel(offscreenCanvas, 99,25, 0,255,0,255, "99,25", "0,255,0,255");
43 _assertPixel(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255");
44 _assertPixel(offscreenCanvas, 50,49, 0,255,0,255, "50,49", "0,255,0,255");
45 _assertPixel(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255");
46
47 t.done();
48
49 });
50 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698