OLD | NEW |
1 description("Test the behavior of CanvasRenderingContext2D.strokeRect() when cal
led with different numbers of arguments."); | 1 description("Test the behavior of CanvasRenderingContext2D.strokeRect() when cal
led 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 var SyntaxError = "SyntaxError: Syntax error"; | 5 var TypeErrorNotEnoughArguments = "TypeError: Not enough arguments"; |
6 var TypeError = "TypeError: Type error"; | |
7 | 6 |
8 shouldBe("ctx.strokeRect()", "undefined"); | 7 shouldThrow("ctx.strokeRect()", "TypeErrorNotEnoughArguments"); |
9 shouldBe("ctx.strokeRect(0)", "undefined"); | 8 shouldThrow("ctx.strokeRect(0)", "TypeErrorNotEnoughArguments"); |
10 shouldBe("ctx.strokeRect(0, 0)", "undefined"); | 9 shouldThrow("ctx.strokeRect(0, 0)", "TypeErrorNotEnoughArguments"); |
11 shouldBe("ctx.strokeRect(0, 0, 0)", "undefined"); | 10 shouldThrow("ctx.strokeRect(0, 0, 0)", "TypeErrorNotEnoughArguments"); |
12 shouldBe("ctx.strokeRect(0, 0, 0, 0)", "undefined"); | 11 shouldBe("ctx.strokeRect(0, 0, 0, 0)", "undefined"); |
13 shouldBe("ctx.strokeRect(0, 0, 0, 0, 0)", "undefined"); | 12 shouldBe("ctx.strokeRect(0, 0, 0, 0, 0)", "undefined"); |
OLD | NEW |