OLD | NEW |
1 description("Test the argument bounds of canvas createImageData."); | 1 description("Test the argument bounds of canvas createImageData."); |
2 | 2 |
3 var canvas = document.getElementById('canvas'); | 3 var canvas = document.getElementById('canvas'); |
4 var ctx = canvas.getContext('2d'); | 4 var ctx = canvas.getContext('2d'); |
5 | 5 |
6 shouldThrow("ctx.createImageData(Infinity, Infinity)", '"Error: NotSupportedErro
r: DOM Exception 9"'); | 6 shouldThrow("ctx.createImageData(Infinity, Infinity)", '"NotSupportedError: The
implementation did not support the requested type of object or operation."'); |
7 shouldThrow("ctx.createImageData(Infinity, 10)", '"Error: NotSupportedError: DOM
Exception 9"'); | 7 shouldThrow("ctx.createImageData(Infinity, 10)", '"NotSupportedError: The implem
entation did not support the requested type of object or operation."'); |
8 shouldThrow("ctx.createImageData(-Infinity, 10)", '"Error: NotSupportedError: DO
M Exception 9"'); | 8 shouldThrow("ctx.createImageData(-Infinity, 10)", '"NotSupportedError: The imple
mentation did not support the requested type of object or operation."'); |
9 shouldThrow("ctx.createImageData(10, Infinity)", '"Error: NotSupportedError: DOM
Exception 9"'); | 9 shouldThrow("ctx.createImageData(10, Infinity)", '"NotSupportedError: The implem
entation did not support the requested type of object or operation."'); |
10 shouldThrow("ctx.createImageData(10, -Infinity)", '"Error: NotSupportedError: DO
M Exception 9"'); | 10 shouldThrow("ctx.createImageData(10, -Infinity)", '"NotSupportedError: The imple
mentation did not support the requested type of object or operation."'); |
11 shouldThrow("ctx.createImageData(NaN, 10)", '"Error: NotSupportedError: DOM Exce
ption 9"'); | 11 shouldThrow("ctx.createImageData(NaN, 10)", '"NotSupportedError: The implementat
ion did not support the requested type of object or operation."'); |
12 shouldThrow("ctx.createImageData(10, NaN)", '"Error: NotSupportedError: DOM Exce
ption 9"'); | 12 shouldThrow("ctx.createImageData(10, NaN)", '"NotSupportedError: The implementat
ion did not support the requested type of object or operation."'); |
OLD | NEW |