1 This test exercises the CSSMatrix 3D interface
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
7 PASS default constructor
8 PASS object constructor
9 PASS string constructor
12 PASS a[0] is "matrix3d"
13 PASS parseFloat(a2[0]) is 1
14 PASS parseFloat(a2[1]) is 0
15 PASS parseFloat(a2[2]) is 0
16 PASS parseFloat(a2[3]) is 1
17 PASS parseFloat(a2[4]) is 0
18 PASS parseFloat(a2[5]) is 1
19 PASS parseFloat(a2[6]) is 0
20 PASS parseFloat(a2[7]) is 0
21 PASS parseFloat(a2[8]) is 0
22 PASS parseFloat(a2[9]) is 0
23 PASS parseFloat(a2[10]) is 1
24 PASS parseFloat(a2[11]) is 0
25 PASS parseFloat(a2[12]) is 0
26 PASS parseFloat(a2[13]) is 0
27 PASS parseFloat(a2[14]) is 0
28 PASS parseFloat(a3[0]) is 1
31 Test bad input to string constructor
32 PASS new WebKitCSSMatrix("banana") threw exception SyntaxError: Failed to construct 'WebKitCSSMatrix': Failed to parse 'banana'..
34 Test attributes on default matrix
52 Test attributes on custom matrix
70 Test setMatrixValue - set to matrix()
88 Test setMatrixValue - set to translate(10px, 20px, 30px) scale(2, 3, 4)
106 Test throwing exception from setMatrixValue
107 PASS m.setMatrixValue("banana") threw exception SyntaxError: Failed to execute 'setMatrixValue' on 'WebKitCSSMatrix': Failed to parse 'banana'..
108 PASS m.setMatrixValue("translate3d(10em, 20%, 40)") threw exception SyntaxError: Failed to execute 'setMatrixValue' on 'WebKitCSSMatrix': Failed to parse 'translate3d(10em, 20%, 40)'..
109 PASS m.setMatrixValue("translate3d(10px, 20px, 30px) scale3d()") threw exception SyntaxError: Failed to execute 'setMatrixValue' on 'WebKitCSSMatrix': Failed to parse 'translate3d(10px, 20px, 30px) scale3d()'..
112 PASS parseFloat(m3.m11) is 538
113 PASS parseFloat(m3.m12) is 612
114 PASS parseFloat(m3.m13) is 686
115 PASS parseFloat(m3.m14) is 760
116 PASS parseFloat(m3.m21) is 650
117 PASS parseFloat(m3.m22) is 740
118 PASS parseFloat(m3.m23) is 830
119 PASS parseFloat(m3.m24) is 920
120 PASS parseFloat(m3.m31) is 762
121 PASS parseFloat(m3.m32) is 868
122 PASS parseFloat(m3.m33) is 974
123 PASS parseFloat(m3.m34) is 1080
124 PASS parseFloat(m3.m41) is 874
125 PASS parseFloat(m3.m42) is 996
126 PASS parseFloat(m3.m43) is 1118
127 PASS parseFloat(m3.m44) is 1240
129 Test immutability of multiply
130 PASS parseFloat(m.m11) is 1
131 PASS parseFloat(m.m12) is 2
132 PASS parseFloat(m.m13) is 3
133 PASS parseFloat(m.m14) is 4
134 PASS parseFloat(m.m21) is 5
135 PASS parseFloat(m.m22) is 6
136 PASS parseFloat(m.m23) is 7
137 PASS parseFloat(m.m24) is 8
138 PASS parseFloat(m.m31) is 9
139 PASS parseFloat(m.m32) is 10
140 PASS parseFloat(m.m33) is 11
141 PASS parseFloat(m.m34) is 12
142 PASS parseFloat(m.m41) is 13
143 PASS parseFloat(m.m42) is 14
144 PASS parseFloat(m.m43) is 15
145 PASS parseFloat(m.m44) is 16
147 Test multiply in an affine matrix
148 PASS parseFloat(m3.m11) is 31
149 PASS parseFloat(m3.m12) is 46
150 PASS parseFloat(m3.m13) is 0
151 PASS parseFloat(m3.m14) is 0
152 PASS parseFloat(m3.m21) is 39
153 PASS parseFloat(m3.m22) is 58
154 PASS parseFloat(m3.m23) is 0
155 PASS parseFloat(m3.m24) is 0
156 PASS parseFloat(m3.m31) is 0
157 PASS parseFloat(m3.m32) is 0
158 PASS parseFloat(m3.m33) is 1
159 PASS parseFloat(m3.m34) is 0
160 PASS parseFloat(m3.m41) is 52
161 PASS parseFloat(m3.m42) is 76
162 PASS parseFloat(m3.m43) is 0
163 PASS parseFloat(m3.m44) is 1
165 Test that multiply works in the right direction
184 PASS parseFloat(m2.m11) is 0.5
185 PASS parseFloat(m2.m12) is 0
186 PASS parseFloat(m2.m13) is 0
187 PASS parseFloat(m2.m14) is 0
188 PASS parseFloat(m2.m21) is 0
189 PASS parseFloat(m2.m22) is 0.5
190 PASS parseFloat(m2.m23) is 0
191 PASS parseFloat(m2.m24) is 0
192 PASS parseFloat(m2.m31) is 0
193 PASS parseFloat(m2.m32) is 0
194 PASS parseFloat(m2.m33) is 0.5
195 PASS parseFloat(m2.m34) is 0
196 PASS parseFloat(m2.m41) is -5
197 PASS parseFloat(m2.m42) is -10
198 PASS parseFloat(m2.m43) is -15
199 PASS parseFloat(m2.m44) is 1
201 Test immutability of inverse
202 PASS parseFloat(m.m11) is 2
203 PASS parseFloat(m.m12) is 0
204 PASS parseFloat(m.m13) is 0
205 PASS parseFloat(m.m14) is 0
206 PASS parseFloat(m.m21) is 0
207 PASS parseFloat(m.m22) is 2
208 PASS parseFloat(m.m23) is 0
209 PASS parseFloat(m.m24) is 0
210 PASS parseFloat(m.m31) is 0
211 PASS parseFloat(m.m32) is 0
212 PASS parseFloat(m.m33) is 2
213 PASS parseFloat(m.m34) is 0
214 PASS parseFloat(m.m41) is 10
215 PASS parseFloat(m.m42) is 20
216 PASS parseFloat(m.m43) is 30
217 PASS parseFloat(m.m44) is 1
219 Test throwing exception from inverse
220 PASS m.inverse() threw exception NotSupportedError: Failed to execute 'inverse' on 'WebKitCSSMatrix': The matrix is not invertable..
240 Test immutability of translate
276 Test immutability of scale
295 PASS parseFloat(m2.m11.toPrecision(6)) is 0.813798
296 PASS parseFloat(m2.m12.toPrecision(6)) is 0.469846
297 PASS parseFloat(m2.m13.toPrecision(6)) is -0.34202
298 PASS parseFloat(m2.m14.toPrecision(6)) is 0
299 PASS parseFloat(m2.m21.toPrecision(6)) is -0.44097
300 PASS parseFloat(m2.m22.toPrecision(6)) is 0.882564
301 PASS parseFloat(m2.m23.toPrecision(6)) is 0.163176
302 PASS parseFloat(m2.m24.toPrecision(6)) is 0
303 PASS parseFloat(m2.m31.toPrecision(6)) is 0.378522
304 PASS parseFloat(m2.m32.toPrecision(6)) is 0.0180283
305 PASS parseFloat(m2.m33.toPrecision(6)) is 0.925417
306 PASS parseFloat(m2.m34.toPrecision(6)) is 0
307 PASS parseFloat(m2.m41.toPrecision(6)) is 0
308 PASS parseFloat(m2.m42.toPrecision(6)) is 0
309 PASS parseFloat(m2.m43.toPrecision(6)) is 0
310 PASS parseFloat(m2.m44.toPrecision(6)) is 1
312 Test immutability of rotate
331 PASS parseFloat(m2.m11.toPrecision(6)) is 0.804738
332 PASS parseFloat(m2.m12.toPrecision(6)) is 0.505879
333 PASS parseFloat(m2.m13.toPrecision(6)) is -0.310617
334 PASS parseFloat(m2.m14.toPrecision(6)) is 0
335 PASS parseFloat(m2.m21.toPrecision(6)) is -0.310617
336 PASS parseFloat(m2.m22.toPrecision(6)) is 0.804738
337 PASS parseFloat(m2.m23.toPrecision(6)) is 0.505879
338 PASS parseFloat(m2.m24.toPrecision(6)) is 0
339 PASS parseFloat(m2.m31.toPrecision(6)) is 0.505879
340 PASS parseFloat(m2.m32.toPrecision(6)) is -0.310617
341 PASS parseFloat(m2.m33.toPrecision(6)) is 0.804738
342 PASS parseFloat(m2.m34.toPrecision(6)) is 0
343 PASS parseFloat(m2.m41.toPrecision(6)) is 0
344 PASS parseFloat(m2.m42.toPrecision(6)) is 0
345 PASS parseFloat(m2.m43.toPrecision(6)) is 0
346 PASS parseFloat(m2.m44.toPrecision(6)) is 1
348 Test immutability of rotateAxisAngle
366 PASS successfullyParsed is true