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

Side by Side Diff: LayoutTests/fast/canvas/script-tests/canvas-overloads-drawImage.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 description("Test the behavior of CanvasRenderingContext2D.drawImage() when call ed with different numbers of arguments."); 1 description("Test the behavior of CanvasRenderingContext2D.drawImage() when call ed 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 TypeError = "TypeError: Type error"; 5 var TypeError = "TypeError: Type error";
6 var TypeErrorNotEnoughArguments = "TypeError: Not enough arguments"; 6 var TypeErrorNotEnoughArguments = "TypeError: Not enough arguments";
7 7
8 var imageElement = document.createElement("img"); 8 var imageElement = document.createElement("img");
9 shouldThrow("ctx.drawImage()", "TypeErrorNotEnoughArguments"); 9 shouldThrow("ctx.drawImage()", "TypeErrorNotEnoughArguments");
10 shouldThrow("ctx.drawImage(imageElement)", "TypeErrorNotEnoughArguments"); 10 shouldThrow("ctx.drawImage(imageElement)", "TypeErrorNotEnoughArguments");
(...skipping 10 matching lines...) Expand all
21 21
22 var canvasElement = document.createElement("canvas"); 22 var canvasElement = document.createElement("canvas");
23 shouldThrow("ctx.drawImage(canvasElement)", "TypeErrorNotEnoughArguments"); 23 shouldThrow("ctx.drawImage(canvasElement)", "TypeErrorNotEnoughArguments");
24 shouldThrow("ctx.drawImage(canvasElement, 0)", "TypeErrorNotEnoughArguments"); 24 shouldThrow("ctx.drawImage(canvasElement, 0)", "TypeErrorNotEnoughArguments");
25 shouldBe("ctx.drawImage(canvasElement, 0, 0)", "undefined"); 25 shouldBe("ctx.drawImage(canvasElement, 0, 0)", "undefined");
26 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0)", "TypeError"); 26 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0)", "TypeError");
27 shouldBe("ctx.drawImage(canvasElement, 0, 0, 0, 0)", "undefined"); 27 shouldBe("ctx.drawImage(canvasElement, 0, 0, 0, 0)", "undefined");
28 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0)", "TypeError"); 28 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0)", "TypeError");
29 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0)", "TypeError"); 29 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0)", "TypeError");
30 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0)", "TypeError"); 30 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0)", "TypeError");
31 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0)", "'Error: Ind exSizeError: DOM Exception 1'"); 31 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0)", "'IndexSizeE rror: Index or size was negative, or greater than the allowed value.'");
32 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeErro r"); 32 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeErro r");
33 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeE rror"); 33 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "TypeE rror");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698