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

Side by Side Diff: LayoutTests/fast/canvas/script-tests/canvas-getImageData-invalid.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 handling of invalid arguments in canvas getImageData()."); 1 description("Test the handling of invalid arguments in canvas getImageData().");
2 2
3 ctx = document.createElement('canvas').getContext('2d'); 3 ctx = document.createElement('canvas').getContext('2d');
4 4
5 shouldThrow("ctx.getImageData(NaN, 10, 10, 10)", '"Error: NotSupportedError: DOM Exception 9"'); 5 shouldThrow("ctx.getImageData(NaN, 10, 10, 10)", '"NotSupportedError: The implem entation did not support the requested type of object or operation."');
6 shouldThrow("ctx.getImageData(10, NaN, 10, 10)", '"Error: NotSupportedError: DOM Exception 9"'); 6 shouldThrow("ctx.getImageData(10, NaN, 10, 10)", '"NotSupportedError: The implem entation did not support the requested type of object or operation."');
7 shouldThrow("ctx.getImageData(10, 10, NaN, 10)", '"Error: NotSupportedError: DOM Exception 9"'); 7 shouldThrow("ctx.getImageData(10, 10, NaN, 10)", '"NotSupportedError: The implem entation did not support the requested type of object or operation."');
8 shouldThrow("ctx.getImageData(10, 10, 10, NaN)", '"Error: NotSupportedError: DOM Exception 9"'); 8 shouldThrow("ctx.getImageData(10, 10, 10, NaN)", '"NotSupportedError: The implem entation did not support the requested type of object or operation."');
9 shouldThrow("ctx.getImageData(Infinity, 10, 10, 10)", '"Error: NotSupportedError : DOM Exception 9"'); 9 shouldThrow("ctx.getImageData(Infinity, 10, 10, 10)", '"NotSupportedError: The i mplementation did not support the requested type of object or operation."');
10 shouldThrow("ctx.getImageData(10, Infinity, 10, 10)", '"Error: NotSupportedError : DOM Exception 9"'); 10 shouldThrow("ctx.getImageData(10, Infinity, 10, 10)", '"NotSupportedError: The i mplementation did not support the requested type of object or operation."');
11 shouldThrow("ctx.getImageData(10, 10, Infinity, 10)", '"Error: NotSupportedError : DOM Exception 9"'); 11 shouldThrow("ctx.getImageData(10, 10, Infinity, 10)", '"NotSupportedError: The i mplementation did not support the requested type of object or operation."');
12 shouldThrow("ctx.getImageData(10, 10, 10, Infinity)", '"Error: NotSupportedError : DOM Exception 9"'); 12 shouldThrow("ctx.getImageData(10, 10, 10, Infinity)", '"NotSupportedError: The i mplementation did not support the requested type of object or operation."');
13 shouldThrow("ctx.getImageData(undefined, 10, 10, 10)", '"Error: NotSupportedErro r: DOM Exception 9"'); 13 shouldThrow("ctx.getImageData(undefined, 10, 10, 10)", '"NotSupportedError: The implementation did not support the requested type of object or operation."');
14 shouldThrow("ctx.getImageData(10, undefined, 10, 10)", '"Error: NotSupportedErro r: DOM Exception 9"'); 14 shouldThrow("ctx.getImageData(10, undefined, 10, 10)", '"NotSupportedError: The implementation did not support the requested type of object or operation."');
15 shouldThrow("ctx.getImageData(10, 10, undefined, 10)", '"Error: NotSupportedErro r: DOM Exception 9"'); 15 shouldThrow("ctx.getImageData(10, 10, undefined, 10)", '"NotSupportedError: The implementation did not support the requested type of object or operation."');
16 shouldThrow("ctx.getImageData(10, 10, 10, undefined)", '"Error: NotSupportedErro r: DOM Exception 9"'); 16 shouldThrow("ctx.getImageData(10, 10, 10, undefined)", '"NotSupportedError: The implementation did not support the requested type of object or operation."');
17 shouldThrow("ctx.getImageData(10, 10, 0, 10)", '"Error: IndexSizeError: DOM Exce ption 1"'); 17 shouldThrow("ctx.getImageData(10, 10, 0, 10)", '"IndexSizeError: Index or size w as negative, or greater than the allowed value."');
18 shouldThrow("ctx.getImageData(10, 10, 10, 0)", '"Error: IndexSizeError: DOM Exce ption 1"'); 18 shouldThrow("ctx.getImageData(10, 10, 10, 0)", '"IndexSizeError: Index or size w as negative, or greater than the allowed value."');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698