blob: c0f65520a3b37b3d65e886b5c513413b4628cfe8 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Test the behavior of CanvasRenderingContext2D.strokeText() when called with different numbers of arguments.");
var ctx = document.createElement('canvas').getContext('2d');
var NotEnoughArguments = "TypeError: Not enough arguments";
shouldThrow("ctx.strokeText()", "NotEnoughArguments");
shouldThrow("ctx.strokeText('moo')", "NotEnoughArguments");
shouldThrow("ctx.strokeText('moo',0)", "NotEnoughArguments");
shouldBe("ctx.strokeText('moo',0,0)", "undefined");
shouldBe("ctx.strokeText('moo',0,0,0)", "undefined");
shouldBe("ctx.strokeText('moo',0,0,0,0)", "undefined");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>