| OLD | NEW |
| 1 description("Test the behavior of CanvasRenderingContext2D.strokeText() when cal
led with different numbers of arguments."); | 1 description("Test the behavior of CanvasRenderingContext2D.strokeText() 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 NotEnoughArguments = "TypeError: Not enough arguments"; | 5 function ExpectedMessage(num) { |
| 6 return "\"TypeError: Failed to execute 'strokeText' on 'CanvasRenderingConte
xt2D': 3 arguments required, but only " + num + " present.\""; |
| 7 } |
| 6 | 8 |
| 7 shouldThrow("ctx.strokeText()", "NotEnoughArguments"); | 9 shouldThrow("ctx.strokeText()", ExpectedMessage(0)); |
| 8 shouldThrow("ctx.strokeText('moo')", "NotEnoughArguments"); | 10 shouldThrow("ctx.strokeText('moo')", ExpectedMessage(1)); |
| 9 shouldThrow("ctx.strokeText('moo',0)", "NotEnoughArguments"); | 11 shouldThrow("ctx.strokeText('moo',0)", ExpectedMessage(2)); |
| 10 shouldBe("ctx.strokeText('moo',0,0)", "undefined"); | 12 shouldBe("ctx.strokeText('moo',0,0)", "undefined"); |
| 11 shouldBe("ctx.strokeText('moo',0,0,0)", "undefined"); | 13 shouldBe("ctx.strokeText('moo',0,0,0)", "undefined"); |
| 12 shouldBe("ctx.strokeText('moo',0,0,0,0)", "undefined"); | 14 shouldBe("ctx.strokeText('moo',0,0,0,0)", "undefined"); |
| OLD | NEW |