summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-overloads-strokeText.js
blob: 8a9079ff90b1d1e8eb1d3347fd518b5ee511c0c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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");

var successfullyParsed = true;