2 <title>Canvas test:
2d.path.isPointInPath.nonfinite
</title>
3 <!-- Testing: isPointInPath() returns false for non-finite arguments -->
4 <script src=
"/MochiKit/MochiKit.js"></script>
5 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel=
"stylesheet" href=
"/tests/SimpleTest/test.css">
8 <canvas id=
"c" width=
"100" height=
"50"><p class=
"fallback">FAIL (fallback content)
</p></canvas>
11 SimpleTest
.waitForExplicitFinish();
12 MochiKit
.DOM
.addLoadEvent(function () {
14 var canvas
= document
.getElementById('c');
15 var ctx
= canvas
.getContext('2d');
17 var _thrown_outer
= false;
20 ctx
.rect(-100, -50, 200, 100);
21 ok(ctx
.isPointInPath(Infinity
, 0) === false, "ctx.isPointInPath(Infinity, 0) === false");
22 ok(ctx
.isPointInPath(-Infinity
, 0) === false, "ctx.isPointInPath(-Infinity, 0) === false");
23 ok(ctx
.isPointInPath(NaN
, 0) === false, "ctx.isPointInPath(NaN, 0) === false");
24 ok(ctx
.isPointInPath(0, Infinity
) === false, "ctx.isPointInPath(0, Infinity) === false");
25 ok(ctx
.isPointInPath(0, -Infinity
) === false, "ctx.isPointInPath(0, -Infinity) === false");
26 ok(ctx
.isPointInPath(0, NaN
) === false, "ctx.isPointInPath(0, NaN) === false");
27 ok(ctx
.isPointInPath(NaN
, NaN
) === false, "ctx.isPointInPath(NaN, NaN) === false");
32 todo(!_thrown_outer
, 'should not throw exception');