Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: LayoutTests/fast/canvas/canvas-putImageData.js

Issue 16818023: DOMException toString is not correct (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/canvas/canvas-putImageData.js
diff --git a/LayoutTests/fast/canvas/canvas-putImageData.js b/LayoutTests/fast/canvas/canvas-putImageData.js
index bfa09fd1b4e421b468b92f3530cdec8e9a021003..b755050f52ff495197753b26cc92748a36bd1cbe 100644
--- a/LayoutTests/fast/canvas/canvas-putImageData.js
+++ b/LayoutTests/fast/canvas/canvas-putImageData.js
@@ -39,7 +39,7 @@ var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");
if (!context.createImageData)
- context.createImageData = function(w,h) {
+ context.createImageData = function(w,h) {
var data = this.getImageData(0, 0, w, h);
for (var i = 0; i < data.data.length; i++)
data.data[i] = 0;
@@ -202,24 +202,24 @@ pixelShouldBe(9, 9, [0, 128,0,255]);
shouldThrow("context.putImageData({}, 0, 0)", "'TypeError: Type error'");
-shouldThrow("context.putImageData(buffer, NaN, 0, 0, 0, 0, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, NaN, 0, 0, 0, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, 0, NaN, 0, 0, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, 0, 0, NaN, 0, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, NaN, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, 0, NaN)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, Infinity, 0, 0, 0, 0, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, Infinity, 0, 0, 0, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, 0, Infinity, 0, 0, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, 0, 0, Infinity, 0, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, Infinity, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, 0, Infinity)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, undefined, 0, 0, 0, 0, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, undefined, 0, 0, 0, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, 0, undefined, 0, 0, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, 0, 0, undefined, 0, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, undefined, 0)", "'Error: NotSupportedError: DOM Exception 9'");
-shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, 0, undefined)", "'Error: NotSupportedError: DOM Exception 9'");
+shouldThrow("context.putImageData(buffer, NaN, 0, 0, 0, 0, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, NaN, 0, 0, 0, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, 0, NaN, 0, 0, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, 0, 0, NaN, 0, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, NaN, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, 0, NaN)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, Infinity, 0, 0, 0, 0, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, Infinity, 0, 0, 0, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, 0, Infinity, 0, 0, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, 0, 0, Infinity, 0, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, Infinity, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, 0, Infinity)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, undefined, 0, 0, 0, 0, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, undefined, 0, 0, 0, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, 0, undefined, 0, 0, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, 0, 0, undefined, 0, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, undefined, 0)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
+shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, 0, undefined)", "'NotSupportedError: The implementation did not support the requested type of object or operation.'");
// Ensure we don't mess up bounds clipping checks
var rectcanvas = document.createElement("canvas");

Powered by Google App Engine
This is Rietveld 408576698