summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/canvas/canvas-arc-negative-radius.html
blob: a1810f53b5e1f51acf0fa6be782bf0529d750d0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>

<script>
description("Tests CanvasPathMethods arc and arcTo with negative radii.");

var canvas = document.createElement("canvas");
var ctx = canvas.getContext('2d');

shouldNotThrow("ctx.arc(10, 10, 5, 0, 1, false)");
shouldNotThrow("ctx.arc(10, 10, 0, 0, 1, false)");
shouldThrow("ctx.arc(10, 10, -5, 0, 1, false)");

shouldNotThrow("ctx.arcTo(10, 10, 20, 20, 5)")
shouldNotThrow("ctx.arcTo(10, 10, 20, 20, 0)")
shouldThrow("ctx.arcTo(10, 10, 20, 20, -5)")

var path = new Path2D();

shouldNotThrow("path.arc(10, 10, 5, 0, 1, false)");
shouldNotThrow("path.arc(10, 10, 0, 0, 1, false)");
shouldThrow("path.arc(10, 10, -5, 0, 1, false)");

shouldNotThrow("path.arcTo(10, 10, 20, 20, 5)")
shouldNotThrow("path.arcTo(10, 10, 20, 20, 0)")
shouldThrow("path.arcTo(10, 10, 20, 20, -5)")
</script>
</body>
</html>