4 https://bugzilla.mozilla.org/show_bug.cgi?id=728629
8 <title>Test for Bug
728629</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
11 <script type=
"application/javascript">
13 /** Test for Bug
728629 **/
14 SimpleTest.waitForExplicitFinish();
16 var c = document.createElement('canvas');
17 document.body.appendChild(c);
19 c.getContext(
"2d").strokeText(
"Hello",NaN,
50);
20 ok(true,
"strokeText should not throw with NaN.");
22 ok(false,
"strokeText should not throw with NaN.");
25 c.getContext(
"2d").strokeText(
"Hello",Infinity,
50);
26 ok(true,
"strokeText should not throw with Infinity.");
28 ok(false,
"strokeText should not throw with Infinity.");
31 c.getContext(
"2d").strokeText(
"Hello",undefined,
50);
32 ok(true,
"strokeText should not throw with undefined.");
34 ok(false,
"strokeText should not throw with undefined.");
37 c.getContext(
"2d").fillText(
"Hello",NaN,
50);
38 ok(true,
"fillText should not throw with NaN.");
40 ok(false,
"fillText should not throw with NaN.");
43 c.getContext(
"2d").fillText(
"Hello",Infinity,
50);
44 ok(true,
"fillText should not throw with Infinity.");
46 ok(false,
"fillText should not throw with Infinity.");
49 c.getContext(
"2d").fillText(
"Hello",undefined,
50);
50 ok(true,
"fillText should not throw with undefined.");
52 ok(false,
"fillText should not throw with undefined.");
59 <body onload=
"test();">
60 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=728629">Mozilla Bug
728629</a>
62 <div id=
"content" style=
"display: none">