/** Test for Bug 728629 **/
SimpleTest.waitForExplicitFinish();
function test() { var c = document.createElement('canvas');
document.body.appendChild(c);
try {
c.getContext("2d").strokeText("Hello",NaN,50);
ok(true, "strokeText should not throw with NaN.");
} catch (e) {
ok(false, "strokeText should not throw with NaN.");
}
try {
c.getContext("2d").strokeText("Hello",Infinity,50);
ok(true, "strokeText should not throw with Infinity.");
} catch (e) {
ok(false, "strokeText should not throw with Infinity.");
}
try {
c.getContext("2d").strokeText("Hello",undefined,50);
ok(true, "strokeText should not throw with undefined.");
} catch (e) {
ok(false, "strokeText should not throw with undefined.");
}
try {
c.getContext("2d").fillText("Hello",NaN,50);
ok(true, "fillText should not throw with NaN.");
} catch (e) {
ok(false, "fillText should not throw with NaN.");
}
try {
c.getContext("2d").fillText("Hello",Infinity,50);
ok(true, "fillText should not throw with Infinity.");
} catch (e) {
ok(false, "fillText should not throw with Infinity.");
}
try {
c.getContext("2d").fillText("Hello",undefined,50);
ok(true, "fillText should not throw with undefined.");
} catch (e) {
ok(false, "fillText should not throw with undefined.");
}
SimpleTest.finish();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.