1 This test exercises the CSSMatrix interface
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
8 PASS new WebKitCSSMatrix() is non-null.
9 PASS new WebKitCSSMatrix(m) is non-null.
10 PASS new WebKitCSSMatrix("matrix(1, 0, 0, 1, 0, 0)") is non-null.
11 PASS new WebKitCSSMatrix("") is non-null.
12 PASS new WebKitCSSMatrix("none") is non-null.
13 PASS new WebKitCSSMatrix(" none ") is non-null.
17 PASS parseFloat(a2[0]) is 1
18 PASS parseFloat(a2[1]) is 0
19 PASS parseFloat(a2[2]) is 0
20 PASS parseFloat(a2[3]) is 1
21 PASS parseFloat(a2[4]) is 0
22 PASS parseFloat(a3[0]) is 0
25 Test bad input to string constructor
26 PASS new WebKitCSSMatrix("banana") threw exception SyntaxError: Failed to construct 'WebKitCSSMatrix': Failed to parse 'banana'..
28 Test attributes on default matrix
36 Test attributes on custom matrix
44 Test setMatrixValue - set to matrix()
52 Test setMatrixValue - set to translate(10px, 20px) scale(2, 3)
60 Test throwing exception from setMatrixValue
61 PASS m.setMatrixValue("banana") threw exception SyntaxError: Failed to execute 'setMatrixValue' on 'WebKitCSSMatrix': Failed to parse 'banana'..
62 PASS m.setMatrixValue("translate(10em, 20%)") threw exception SyntaxError: Failed to execute 'setMatrixValue' on 'WebKitCSSMatrix': The transformation depends on the box size, which is not supported..
63 PASS m.setMatrixValue("translate(10px, 20px) scale()") threw exception SyntaxError: Failed to execute 'setMatrixValue' on 'WebKitCSSMatrix': Failed to parse 'translate(10px, 20px) scale()'..
65 Test attributes on translate() and accumulation
73 Test immutability of translate
74 PASS parseFloat(m.a) is 1
75 PASS parseFloat(m.b) is 0
76 PASS parseFloat(m.c) is 0
77 PASS parseFloat(m.d) is 1
78 PASS parseFloat(m.e) is 0
79 PASS parseFloat(m.f) is 0
81 Test attributes on scale()
89 Test immutability of scale()
90 PASS parseFloat(m2.a) is 1
91 PASS parseFloat(m2.b) is 0
92 PASS parseFloat(m2.c) is 0
93 PASS parseFloat(m2.d) is 1
94 PASS parseFloat(m2.e) is 100
95 PASS parseFloat(m2.f) is 50
97 Test attributes on non-uniform scale()
105 Test immutability of non-uniform scale()
106 PASS parseFloat(m3.a) is 5
107 PASS parseFloat(m3.b) is 0
108 PASS parseFloat(m3.c) is 0
109 PASS parseFloat(m3.d) is 5
110 PASS parseFloat(m3.e) is 100
111 PASS parseFloat(m3.f) is 50
114 PASS parseFloat(m2.a.toPrecision(6)) is 0.984808
115 PASS parseFloat(m2.b.toPrecision(6)) is 0.173648
116 PASS parseFloat(m2.c.toPrecision(6)) is -0.173648
117 PASS parseFloat(m2.d.toPrecision(6)) is 0.984808
121 Test immutability of rotate
122 PASS parseFloat(m.a) is 1
123 PASS parseFloat(m.b) is 0
124 PASS parseFloat(m.c) is 0
125 PASS parseFloat(m.d) is 1
126 PASS parseFloat(m.e) is 0
127 PASS parseFloat(m.f) is 0
129 Test skew in horizontal direction
130 PASS parseFloat(m2.a) is 1
131 PASS parseFloat(m2.b) is 0
132 PASS parseFloat(m2.c.toPrecision(6)) is 0.176327
133 PASS parseFloat(m2.d) is 1
134 PASS parseFloat(m2.e) is 0
135 PASS parseFloat(m2.f) is 0
137 Test immutability of horizontal skew
138 PASS parseFloat(m.a) is 1
139 PASS parseFloat(m.b) is 0
140 PASS parseFloat(m.c) is 0
141 PASS parseFloat(m.d) is 1
142 PASS parseFloat(m.e) is 0
143 PASS parseFloat(m.f) is 0
145 Test skew in vertical direction
146 PASS parseFloat(m2.a) is 1
147 PASS parseFloat(m2.b.toPrecision(6)) is 0.700208
148 PASS parseFloat(m2.c) is 0
149 PASS parseFloat(m2.d) is 1
150 PASS parseFloat(m2.e) is 0
151 PASS parseFloat(m2.f) is 0
153 Test immutability of vertical skew
154 PASS parseFloat(m.a) is 1
155 PASS parseFloat(m.b) is 0
156 PASS parseFloat(m.c) is 0
157 PASS parseFloat(m.d) is 1
158 PASS parseFloat(m.e) is 0
159 PASS parseFloat(m.f) is 0
162 PASS parseFloat(m3.a) is 31
163 PASS parseFloat(m3.b) is 46
164 PASS parseFloat(m3.c) is 39
165 PASS parseFloat(m3.d) is 58
166 PASS parseFloat(m3.e) is 52
167 PASS parseFloat(m3.f) is 76
169 Test that multiply works in the right direction
177 Test immutability of multiply
191 Test multiply with missing argument
195 PASS parseFloat(m2.a) is 0.5
196 PASS parseFloat(m2.b) is 0
197 PASS parseFloat(m2.c) is 0
198 PASS parseFloat(m2.d) is 0.5
199 PASS parseFloat(m2.e) is -5
200 PASS parseFloat(m2.f) is -10
202 Test immutability of inverse
203 PASS parseFloat(m.a) is 2
204 PASS parseFloat(m.b) is 0
205 PASS parseFloat(m.c) is 0
206 PASS parseFloat(m.d) is 2
207 PASS parseFloat(m.e) is 10
208 PASS parseFloat(m.f) is 20
210 Test throwing exception from inverse
211 PASS m.inverse() threw exception NotSupportedError: Failed to execute 'inverse' on 'WebKitCSSMatrix': The matrix is not invertable..
213 PASS successfullyParsed is true