tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / fast / canvas / script-tests / canvas-overloads-setShadow.js
1 description("Test the behavior of CanvasRenderingContext2D.setShadow() when called with different numbers of arguments.");
2
3 var ctx = document.createElement('canvas').getContext('2d');
4
5 var TypeError = "TypeError: Type error";
6
7 shouldThrow("ctx.setShadow()", "TypeError");
8 shouldThrow("ctx.setShadow(0)", "TypeError");
9 shouldThrow("ctx.setShadow(0, 0)", "TypeError");
10 shouldBe("ctx.setShadow(0, 0, 0)", "undefined");
11 shouldBe("ctx.setShadow(0, 0, 0, 0)", "undefined");
12 shouldBe("ctx.setShadow(0, 0, 0, 0, 0)", "undefined");
13 shouldThrow("ctx.setShadow(0, 0, 0, 0, 0, 0)", "TypeError");
14 shouldBe("ctx.setShadow(0, 0, 0, 0, 'red')", "undefined");
15 shouldThrow("ctx.setShadow(0, 0, 0, 0, 'red', 0)", "TypeError");
16 shouldBe("ctx.setShadow(0, 0, 0, 0, 'red', 0, 0)", "undefined");
17 shouldThrow("ctx.setShadow(0, 0, 0, 0, 0, 0)", "TypeError");
18 shouldBe("ctx.setShadow(0, 0, 0, 0, 0, 0, 0)", "undefined");
19 shouldBe("ctx.setShadow(0, 0, 0, 0, 0, 0, 0, 0)", "undefined");
20 shouldThrow("ctx.setShadow(0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeError");