Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / script-tests / canvas-overloads-fillText.js
blob452bfc317103698a955806111c0f47e38237bc2b
1 description("Test the behavior of CanvasRenderingContext2D.fillText() when called with different numbers of arguments.");
3 var ctx = document.createElement('canvas').getContext('2d');
5 function ExpectedNotEnoughArgumentsMessage(num) {
6     return "\"TypeError: Failed to execute 'fillText' on 'CanvasRenderingContext2D': 3 arguments required, but only " + num + " present.\"";
9 shouldThrow("ctx.fillText()", ExpectedNotEnoughArgumentsMessage(0));
10 shouldThrow("ctx.fillText('moo')", ExpectedNotEnoughArgumentsMessage(1));
11 shouldThrow("ctx.fillText('moo',0)", ExpectedNotEnoughArgumentsMessage(2));
12 shouldBe("ctx.fillText('moo',0,0)", "undefined");
13 shouldBe("ctx.fillText('moo',0,0,0)", "undefined");
14 shouldBe("ctx.fillText('moo',0,0,0,0)", "undefined");