4 <script src=
"../../resources/js-test.js"></script>
7 <p id=
"description"></p>
8 <div id=
"console"></div>
11 description("Tests CanvasPathMethods ellipse with negative radii.");
13 var canvas
= document
.createElement("canvas");
14 var ctx
= canvas
.getContext('2d');
16 shouldNotThrow("ctx.ellipse(10, 10, 10, 5, 0, 0, 1, false)");
17 shouldNotThrow("ctx.ellipse(10, 10, 10, 0, 0, 0, 1, false)");
18 shouldNotThrow("ctx.ellipse(10, 10, -0, 5, 0, 0, 1, false)");
20 shouldThrow("ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false)");
21 shouldThrow("ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false)");
22 shouldThrow("ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false)");
24 // FIXME: When this is exposed on Path as well as CanvasRenderingContext2D, add tests for Path as well.