Index: LayoutTests/fast/canvas/script-tests/canvas-overloads-drawImage.js |
diff --git a/LayoutTests/fast/canvas/script-tests/canvas-overloads-drawImage.js b/LayoutTests/fast/canvas/script-tests/canvas-overloads-drawImage.js |
index 9db3cc508da32ddf98a97c0a3631732babb35e12..dfccb6119d40cf2967de8db3e1a32172253b7241 100644 |
--- a/LayoutTests/fast/canvas/script-tests/canvas-overloads-drawImage.js |
+++ b/LayoutTests/fast/canvas/script-tests/canvas-overloads-drawImage.js |
@@ -2,35 +2,29 @@ description("Test the behavior of CanvasRenderingContext2D.drawImage() when call |
var ctx = document.createElement('canvas').getContext('2d'); |
-function ExpectedNotEnoughArgumentsMessage(num) { |
- return "\"TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': 3 arguments required, but only " + num + " present.\""; |
-} |
- |
-var TypeError = "TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': No function was found that matched the signature provided."; |
- |
var imageElement = document.createElement("img"); |
-shouldThrow("ctx.drawImage()", ExpectedNotEnoughArgumentsMessage(0)); |
-shouldThrow("ctx.drawImage(imageElement)", ExpectedNotEnoughArgumentsMessage(1)); |
-shouldThrow("ctx.drawImage(imageElement, 0)", ExpectedNotEnoughArgumentsMessage(2)); |
+shouldThrow("ctx.drawImage()"); |
+shouldThrow("ctx.drawImage(imageElement)"); |
+shouldThrow("ctx.drawImage(imageElement, 0)"); |
shouldBe("ctx.drawImage(imageElement, 0, 0)", "undefined"); |
-shouldThrow("ctx.drawImage(imageElement, 0, 0, 0)", "TypeError"); |
+shouldThrow("ctx.drawImage(imageElement, 0, 0, 0)"); |
shouldBe("ctx.drawImage(imageElement, 0, 0, 0, 0)", "undefined"); |
-shouldThrow("ctx.drawImage(imageElement, 0, 0, 0, 0, 0)", "TypeError"); |
-shouldThrow("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0)", "TypeError"); |
-shouldThrow("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0)", "TypeError"); |
+shouldThrow("ctx.drawImage(imageElement, 0, 0, 0, 0, 0)"); |
+shouldThrow("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0)"); |
+shouldThrow("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0)"); |
shouldBe("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0)", "undefined"); |
-shouldThrow("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeError"); |
-shouldThrow("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeError"); |
+shouldThrow("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)"); |
+shouldThrow("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"); |
var canvasElement = document.createElement("canvas"); |
-shouldThrow("ctx.drawImage(canvasElement)", ExpectedNotEnoughArgumentsMessage(1)); |
-shouldThrow("ctx.drawImage(canvasElement, 0)", ExpectedNotEnoughArgumentsMessage(2)); |
+shouldThrow("ctx.drawImage(canvasElement)"); |
+shouldThrow("ctx.drawImage(canvasElement, 0)"); |
shouldBe("ctx.drawImage(canvasElement, 0, 0)", "undefined"); |
-shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0)", "TypeError"); |
+shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0)"); |
shouldBe("ctx.drawImage(canvasElement, 0, 0, 0, 0)", "undefined"); |
-shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0)", "TypeError"); |
-shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0)", "TypeError"); |
-shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0)", "TypeError"); |
+shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0)"); |
+shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0)"); |
+shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0)"); |
shouldBe("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0)", "undefined"); |
-shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeError"); |
-shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeError"); |
+shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)"); |
+shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"); |