blob: 775a87c223a5c000263cab91cf6fd90264b3cbf4 [file] [log] [blame]
Andrew Top61a84952019-04-30 15:07:33 -07001<!DOCTYPE html>
2<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
3<title>Canvas test: 2d.path.arc.twopie.2</title>
4<script src="/resources/testharness.js"></script>
5<script src="/resources/testharnessreport.js"></script>
6<script src="/common/canvas-tests.js"></script>
7<link rel="stylesheet" href="/common/canvas-tests.css">
8<body class="show_output">
9
10<h1>2d.path.arc.twopie.2</h1>
11<p class="desc">arc() draws a full circle when end = start + 2pi-e and clockwise</p>
12
13
14<p class="output">Actual output:</p>
15<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
16<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
17<ul id="d"></ul>
18<script>
19var t = async_test("arc() draws a full circle when end = start + 2pi-e and clockwise");
20_addTest(function(canvas, ctx) {
21
22ctx.fillStyle = '#f00';
23ctx.fillRect(0, 0, 100, 50);
24ctx.strokeStyle = '#0f0';
25ctx.lineWidth = 100;
26ctx.beginPath();
27ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, false);
28ctx.stroke();
29_assertPixel(canvas, 50,20, 0,255,0,255, "50,20", "0,255,0,255");
30
31
32});
33</script>
34