Chromium Code Reviews| Index: LayoutTests/fast/canvas/drawImage-with-valid-image.html |
| diff --git a/LayoutTests/fast/canvas/drawImage-with-valid-image.html b/LayoutTests/fast/canvas/drawImage-with-valid-image.html |
| index 5e870be1ddb9f02c81bf552b695a408bb3928a63..541f4c24e8e68a8441ae402d4f4d3dc6bfb7ecae 100644 |
| --- a/LayoutTests/fast/canvas/drawImage-with-valid-image.html |
| +++ b/LayoutTests/fast/canvas/drawImage-with-valid-image.html |
| @@ -7,7 +7,9 @@ |
| window.jsTestIsAsync = true; |
| description("This test checks behavior of valid arguments to Canvas::drawImage that use a valid source image."); |
| - var TypeError = "TypeError: Not enough arguments"; |
| + function ExpectedNotEnoughArgumentsMessage(num) { |
| + return "\"TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': 3 arguments required, but only " + num + " present.\""; |
| + } |
| var IndexSizeError = "IndexSizeError: Index or size was negative, or greater than the allowed value."; |
| // Create image |
| @@ -20,13 +22,13 @@ |
| var ctx = document.createElement("canvas").getContext('2d'); |
| function draw() { |
| // No arguments should get exception |
| - shouldThrow("ctx.drawImage()", "TypeError"); |
| + shouldThrow("ctx.drawImage()", ExpectedNotEnoughArgumentsMessage(0)); |
| // image argument only should get exception |
| - shouldThrow("ctx.drawImage(myImage)", "TypeError"); |
| + shouldThrow("ctx.drawImage(myImage)", ExpectedNotEnoughArgumentsMessage(1)); |
| // image argument plus one number should get exception |
| - shouldThrow("ctx.drawImage(myImage, 0)", "TypeError"); |
| + shouldThrow("ctx.drawImage(myImage, 0)", ExpectedNotEnoughArgumentsMessage(2)); |
| // image argument plus 2 numbers |
| shouldNotThrow("ctx.drawImage(myImage, 0, 0)"); |
| @@ -151,4 +153,4 @@ |
| </script> |
| <script src="../js/resources/js-test-post.js"></script> |
| </body> |
| -</html> |
| +</html> |
|
marja
2013/09/18 10:24:08
What's this?
Mike West
2013/09/18 11:16:34
Idunno. Line ending change? Not something I intent
|