| OLD | NEW |
| 1 <script src="../../resources/testharness.js"></script> | 1 <script src="../../resources/testharness.js"></script> |
| 2 <script src="../../resources/testharnessreport.js"></script> | 2 <script src="../../resources/testharnessreport.js"></script> |
| 3 <p id="description"></p> | 3 <p id="description"></p> |
| 4 <div id="console"></div> | 4 <div id="console"></div> |
| 5 | 5 |
| 6 <script> | 6 <script> |
| 7 test(function(t) { | 7 test(function(t) { |
| 8 var canvas = document.createElement("canvas"); | 8 var canvas = document.createElement("canvas"); |
| 9 var ctx = canvas.getContext('2d'); | 9 var ctx = canvas.getContext('2d'); |
| 10 | 10 |
| 11 ctx.arc(10, 10, 5, 0, 1, false); | 11 ctx.arc(10, 10, 5, 0, 1, false); |
| 12 ctx.arc(10, 10, 0, 0, 1, false); | 12 ctx.arc(10, 10, 0, 0, 1, false); |
| 13 assert_throws(null, function() {ctx.arc(10, 10, -5, 0, 1, false);}); | 13 assert_throws(null, function() {ctx.arc(10, 10, -5, 0, 1, false);}); |
| 14 | 14 |
| 15 ctx.arcTo(10, 10, 20, 20, 5); | 15 ctx.arcTo(10, 10, 20, 20, 5); |
| 16 ctx.arcTo(10, 10, 20, 20, 0); | 16 ctx.arcTo(10, 10, 20, 20, 0); |
| 17 assert_throws(null, function() {ctx.arcTo(10, 10, 20, 20, -5);}); | 17 assert_throws(null, function() {ctx.arcTo(10, 10, 20, 20, -5);}); |
| 18 | 18 |
| 19 var path = new Path2D(); | 19 var path = new Path2D(); |
| 20 | 20 |
| 21 path.arc(10, 10, 5, 0, 1, false); | 21 path.arc(10, 10, 5, 0, 1, false); |
| 22 path.arc(10, 10, 0, 0, 1, false); | 22 path.arc(10, 10, 0, 0, 1, false); |
| 23 assert_throws(null, function() {path.arc(10, 10, -5, 0, 1, false);}); | 23 assert_throws(null, function() {path.arc(10, 10, -5, 0, 1, false);}); |
| 24 | 24 |
| 25 path.arcTo(10, 10, 20, 20, 5); | 25 path.arcTo(10, 10, 20, 20, 5); |
| 26 path.arcTo(10, 10, 20, 20, 0); | 26 path.arcTo(10, 10, 20, 20, 0); |
| 27 assert_throws(null, function() {path.arcTo(10, 10, 20, 20, -5);}); | 27 assert_throws(null, function() {path.arcTo(10, 10, 20, 20, -5);}); |
| 28 }, 'Tests CanvasPathMethods arc and arcTo with negative radii.'); | 28 }, 'Tests CanvasPath arc and arcTo with negative radii.'); |
| 29 </script> | 29 </script> |
| OLD | NEW |