Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / content / canvas / test / test_2d.path.isPointInPath.arc.html
blob75bfdb1fa3966f369a27c35abf6ffe2e962e9564
1 <!DOCTYPE HTML>
2 <title>Canvas test: 2d.path.isPointInPath.arc</title>
3 <!-- Testing: isPointInPath() works on arcs -->
4 <script src="/MochiKit/MochiKit.js"></script>
5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
7 <body>
8 <canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
9 <script>
11 SimpleTest.waitForExplicitFinish();
12 MochiKit.DOM.addLoadEvent(function () {
14 var canvas = document.getElementById('c');
15 var ctx = canvas.getContext('2d');
17 ctx.arc(50, 25, 10, 0, Math.PI, false);
18 ok(ctx.isPointInPath(50, 10) === false, "ctx.isPointInPath(50, 10) === false");
19 ok(ctx.isPointInPath(50, 20) === false, "ctx.isPointInPath(50, 20) === false");
20 ok(ctx.isPointInPath(50, 30) === true, "ctx.isPointInPath(50, 30) === true");
21 ok(ctx.isPointInPath(50, 40) === false, "ctx.isPointInPath(50, 40) === false");
22 ok(ctx.isPointInPath(30, 20) === false, "ctx.isPointInPath(30, 20) === false");
23 ok(ctx.isPointInPath(70, 20) === false, "ctx.isPointInPath(70, 20) === false");
24 ok(ctx.isPointInPath(30, 30) === false, "ctx.isPointInPath(30, 30) === false");
25 ok(ctx.isPointInPath(70, 30) === false, "ctx.isPointInPath(70, 30) === false");
27 SimpleTest.finish();
29 });
30 </script>