summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-negative-radius.html
blob: f07b5314b637a6856537d0aae789f2258f765e68 (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
<!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 ellipse with negative radii.");

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

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

shouldThrow("ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false)");
shouldThrow("ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false)");
shouldThrow("ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false)");

// FIXME: When this is exposed on Path as well as CanvasRenderingContext2D, add tests for Path as well.
</script>
</body>
</html>