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

Side by Side Diff: LayoutTests/fast/canvas/canvas-ImageData-constructor-expected.txt

Issue 196343032: Implement ImageData constructors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have constructor instance wrappers keep a 'data' property instead. Created 6 years, 9 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
OLDNEW
(Empty)
1 Test canvas ImageData constructor
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4
5
6 PASS imageData is non-null.
7 PASS imageData.data is non-null.
8 PASS imageData.data[11] is 0
9 PASS imageData.width is 100
10 PASS imageData.height is 50
11 PASS imageData.data[32] is 231
12 PASS new ImageData(10) threw exception TypeError: Failed to construct 'ImageData ': 2 arguments required, but only 1 present..
13 PASS new ImageData(0, 10) threw exception IndexSizeError: Failed to construct 'I mageData': The source width is zero or non-finite..
14 PASS new ImageData(10, 0) threw exception IndexSizeError: Failed to construct 'I mageData': The source height is zero or non-finite..
15 PASS new ImageData('width', 'height') threw exception IndexSizeError: Failed to construct 'ImageData': The source width is zero or non-finite..
16 PASS new ImageData(1 << 31, 1 << 31) threw exception IndexSizeError: Failed to c onstruct 'ImageData': The requested image size exceeds the supported range..
17 PASS new ImageData(new Uint8ClampedArray(0)) threw exception TypeError: Failed t o construct 'ImageData': 2 arguments required, but only 1 present..
18 PASS new ImageData(new Uint8Array(100), 25) threw exception IndexSizeError: Fail ed to construct 'ImageData': The source width is zero or non-finite..
19 PASS new ImageData(imageData.data, 0) threw exception IndexSizeError: Failed to construct 'ImageData': The source width is zero or non-finite..
20 PASS new ImageData(imageData.data, 13) threw exception IndexSizeError: Failed to construct 'ImageData': The byte length of the input data is not a multiple of ( 4 * width)..
21 PASS new ImageData(imageData.data, 1 << 31) threw exception IndexSizeError: Fail ed to construct 'ImageData': The byte length of the input data is not a multiple of (4 * width)..
22 PASS new ImageData(imageData.data, 'biggish') threw exception IndexSizeError: Fa iled to construct 'ImageData': The source width is zero or non-finite..
23 PASS new ImageData(imageData.data, 1 << 24, 1 << 31) threw exception IndexSizeEr ror: Failed to construct 'ImageData': The byte length of the input data is not a multiple of (4 * width)..
24 PASS imageDataFromData.width is 100
25 PASS imageDataFromData.height is 50
26 PASS imageDataFromData.data[34] is imageData.data[34]
27 PASS successfullyParsed is true
28
29 TEST COMPLETE
30
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698