| OLD | NEW |
| 1 description("Test the behavior of CanvasRenderingContext2D.setShadow() when call
ed with different numbers of arguments."); | 1 description("Test the behavior of CanvasRenderingContext2D.setShadow() when call
ed with different numbers of arguments."); |
| 2 | 2 |
| 3 var ctx = document.createElement('canvas').getContext('2d'); | 3 var ctx = document.createElement('canvas').getContext('2d'); |
| 4 | 4 |
| 5 function ExpectedNotEnoughArgumentsMessage(num) { | 5 function ExpectedNotEnoughArgumentsMessage(num) { |
| 6 return "\"TypeError: Failed to execute 'setShadow' on 'CanvasRenderingContex
t2D': 3 arguments required, but only " + num + " present.\""; | 6 return "\"TypeError: Failed to execute 'setShadow' on 'CanvasRenderingContex
t2D': 3 arguments required, but only " + num + " present.\""; |
| 7 } | 7 } |
| 8 | 8 |
| 9 var TypeError = "TypeError: Type error"; | 9 var TypeError = '"TypeError: Failed to execute \'setShadow\' on \'CanvasRenderin
gContext2D\': No function was found that matched the signature provided."'; |
| 10 | 10 |
| 11 shouldThrow("ctx.setShadow()", ExpectedNotEnoughArgumentsMessage(0)); | 11 shouldThrow("ctx.setShadow()", ExpectedNotEnoughArgumentsMessage(0)); |
| 12 shouldThrow("ctx.setShadow(0)", ExpectedNotEnoughArgumentsMessage(1)); | 12 shouldThrow("ctx.setShadow(0)", ExpectedNotEnoughArgumentsMessage(1)); |
| 13 shouldThrow("ctx.setShadow(0, 0)", ExpectedNotEnoughArgumentsMessage(2)); | 13 shouldThrow("ctx.setShadow(0, 0)", ExpectedNotEnoughArgumentsMessage(2)); |
| 14 shouldBe("ctx.setShadow(0, 0, 0)", "undefined"); | 14 shouldBe("ctx.setShadow(0, 0, 0)", "undefined"); |
| 15 shouldBe("ctx.setShadow(0, 0, 0, 0)", "undefined"); | 15 shouldBe("ctx.setShadow(0, 0, 0, 0)", "undefined"); |
| 16 shouldBe("ctx.setShadow(0, 0, 0, 0, 0)", "undefined"); | 16 shouldBe("ctx.setShadow(0, 0, 0, 0, 0)", "undefined"); |
| 17 shouldThrow("ctx.setShadow(0, 0, 0, 0, 0, 0)", "TypeError"); | 17 shouldThrow("ctx.setShadow(0, 0, 0, 0, 0, 0)", "TypeError"); |
| 18 shouldBe("ctx.setShadow(0, 0, 0, 0, 'red')", "undefined"); | 18 shouldBe("ctx.setShadow(0, 0, 0, 0, 'red')", "undefined"); |
| 19 shouldThrow("ctx.setShadow(0, 0, 0, 0, 'red', 0)", "TypeError"); | 19 shouldThrow("ctx.setShadow(0, 0, 0, 0, 'red', 0)", "TypeError"); |
| 20 shouldBe("ctx.setShadow(0, 0, 0, 0, 'red', 0, 0)", "undefined"); | 20 shouldBe("ctx.setShadow(0, 0, 0, 0, 'red', 0, 0)", "undefined"); |
| 21 shouldThrow("ctx.setShadow(0, 0, 0, 0, 0, 0)", "TypeError"); | 21 shouldThrow("ctx.setShadow(0, 0, 0, 0, 0, 0)", "TypeError"); |
| 22 shouldBe("ctx.setShadow(0, 0, 0, 0, 0, 0, 0)", "undefined"); | 22 shouldBe("ctx.setShadow(0, 0, 0, 0, 0, 0, 0)", "undefined"); |
| 23 shouldBe("ctx.setShadow(0, 0, 0, 0, 0, 0, 0, 0)", "undefined"); | 23 shouldBe("ctx.setShadow(0, 0, 0, 0, 0, 0, 0, 0)", "undefined"); |
| 24 shouldThrow("ctx.setShadow(0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeError"); | 24 shouldThrow("ctx.setShadow(0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeError"); |
| OLD | NEW |