1 Series of tests to ensure correct behaviour of the ImageData object
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS imageData.width is 2
7 PASS imageData.height is 2
8 PASS imageData.data.length is 16
9 PASS imageData.data[0] is 0
10 PASS imageData.data[1] is 0
11 PASS imageData.data[2] is 0
12 PASS imageData.data[3] is 0
13 PASS imageData.data[4] is 0
14 PASS imageData.data[5] is 0
15 PASS imageData.data[6] is 0
16 PASS imageData.data[7] is 0
17 PASS imageData.data[8] is 0
18 PASS imageData.data[9] is 0
19 PASS imageData.data[10] is 0
20 PASS imageData.data[11] is 0
21 PASS imageData.data[12] is 0
22 PASS imageData.data[13] is 0
23 PASS imageData.data[14] is 0
24 PASS imageData.data[15] is 0
25 PASS imageData.data[0] = NaN, imageData.data[0] is 0
26 PASS imageData.data[0] = true, imageData.data[0] is 1
27 PASS imageData.data[0] = false, imageData.data[0] is 0
28 PASS imageData.data[0] = "garbage", imageData.data[0] is 0
29 PASS imageData.data[0] = -1, imageData.data[0] is 0
30 PASS imageData.data[0] = "0", imageData.data[0] is 0
31 PASS imageData.data[0] = "1", imageData.data[0] is 1
32 PASS imageData.data[0] = "2", imageData.data[0] is 2
33 PASS imageData.data[0] = Infinity, imageData.data[0] is 255
34 PASS imageData.data[0] = -Infinity, imageData.data[0] is 0
35 PASS imageData.data[0] = -5, imageData.data[0] is 0
36 PASS imageData.data[0] = -0.5, imageData.data[0] is 0
37 PASS imageData.data[0] = 0, imageData.data[0] is 0
38 PASS imageData.data[0] = 0.5, imageData.data[0] is 0
39 PASS imageData.data[0] = 5, imageData.data[0] is 5
40 PASS imageData.data[0] = 5.4, imageData.data[0] is 5
41 PASS imageData.data[0] = 255, imageData.data[0] is 255
42 PASS imageData.data[0] = 256, imageData.data[0] is 255
43 PASS imageData.data[0] = null, imageData.data[0] is 0
44 PASS imageData.data[0] = undefined, imageData.data[0] is 0
45 PASS imageData.data['foo']='garbage',imageData.data['foo'] is 'garbage'
46 PASS imageData.data[-1]='garbage',imageData.data[-1] is undefined
47 PASS imageData.data[17]='garbage',imageData.data[17] is undefined
48 PASS successfullyParsed is true