4 <script src=
"../../resources/js-test.js"></script>
7 <p id=
"description"></p>
8 <div id=
"console"></div>
11 description("Tests CanvasPathMethods arc and arcTo with negative radii.");
13 var canvas
= document
.createElement("canvas");
14 var ctx
= canvas
.getContext('2d');
16 shouldNotThrow("ctx.arc(10, 10, 5, 0, 1, false)");
17 shouldNotThrow("ctx.arc(10, 10, 0, 0, 1, false)");
18 shouldThrow("ctx.arc(10, 10, -5, 0, 1, false)");
20 shouldNotThrow("ctx.arcTo(10, 10, 20, 20, 5)")
21 shouldNotThrow("ctx.arcTo(10, 10, 20, 20, 0)")
22 shouldThrow("ctx.arcTo(10, 10, 20, 20, -5)")
24 var path
= new Path2D();
26 shouldNotThrow("path.arc(10, 10, 5, 0, 1, false)");
27 shouldNotThrow("path.arc(10, 10, 0, 0, 1, false)");
28 shouldThrow("path.arc(10, 10, -5, 0, 1, false)");
30 shouldNotThrow("path.arcTo(10, 10, 20, 20, 5)")
31 shouldNotThrow("path.arcTo(10, 10, 20, 20, 0)")
32 shouldThrow("path.arcTo(10, 10, 20, 20, -5)")