OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../resources/testharness.js"></script> | 2 <script src="../resources/testharness.js"></script> |
3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../resources/testharnessreport.js"></script> |
4 | 4 |
5 <script> | 5 <script> |
6 | 6 |
7 test(function() { | 7 test(function() { |
8 var transformValueObject = new TransformValue(); | 8 var transformValueObject = new CSSTransformValue(); |
9 assert_true(transformValueObject instanceof TransformValue); | 9 assert_true(transformValueObject instanceof CSSTransformValue); |
10 assert_true(transformValueObject instanceof CSSStyleValue); | 10 assert_true(transformValueObject instanceof CSSStyleValue); |
11 }, "A TransformValue object can be constructed"); | 11 }, "A CSSTransformValue object can be constructed"); |
12 | 12 |
13 test(function() { | 13 test(function() { |
14 var transformArray = [new CSSScale(2,2), | 14 var transformArray = [new CSSScale(2,2), |
15 new CSSMatrix(1,1,1,1,1,1), new CSSScale(5,6)]; | 15 new CSSMatrix(1,1,1,1,1,1), new CSSScale(5,6)]; |
16 var transformValue = new TransformValue(transformArray); | 16 var transformValue = new CSSTransformValue(transformArray); |
17 assert_true(transformValue.is2D()); | 17 assert_true(transformValue.is2D()); |
18 }, "is2D returns true for transformValues containing only 2D transformComponents
"); | 18 }, "is2D returns true for transformValues containing only 2D transformComponents
"); |
19 | 19 |
20 test(function() { | 20 test(function() { |
21 var transformArray = [new CSSScale(2,2), | 21 var transformArray = [new CSSScale(2,2), |
22 new CSSMatrix(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1), new CSSScale(5,6)]; | 22 new CSSMatrix(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1), new CSSScale(5,6)]; |
23 var transformValue = new TransformValue(transformArray); | 23 var transformValue = new CSSTransformValue(transformArray); |
24 assert_false(transformValue.is2D()); | 24 assert_false(transformValue.is2D()); |
25 }, "is2D returns false for transformValues containing both 2D and 3D transformCo
mponents"); | 25 }, "is2D returns false for transformValues containing both 2D and 3D transformCo
mponents"); |
26 | 26 |
27 test(function() { | 27 test(function() { |
28 var transformArray = [new CSSScale(2,2), | 28 var transformArray = [new CSSScale(2,2), |
29 new CSSMatrix(1,1,1,1,1,1), new CSSScale(5,6)]; | 29 new CSSMatrix(1,1,1,1,1,1), new CSSScale(5,6)]; |
30 var transformValue = new TransformValue(transformArray); | 30 var transformValue = new CSSTransformValue(transformArray); |
31 | 31 |
32 var newTransformArray = []; | 32 var newTransformArray = []; |
33 for (var component of transformValue) { | 33 for (var component of transformValue) { |
34 newTransformArray.push(component); | 34 newTransformArray.push(component); |
35 } | 35 } |
36 assert_true(newTransformArray.length == 3); | 36 assert_true(newTransformArray.length == 3); |
37 assert_true(newTransformArray[0] instanceof CSSScale); | 37 assert_true(newTransformArray[0] instanceof CSSScale); |
38 assert_true(newTransformArray[1] instanceof CSSMatrix); | 38 assert_true(newTransformArray[1] instanceof CSSMatrix); |
39 assert_true(newTransformArray[2] instanceof CSSScale); | 39 assert_true(newTransformArray[2] instanceof CSSScale); |
40 }, "TransformValue can iterate through all its all its transformComponent member
s"); | 40 }, "CSSTransformValue can iterate through all its all its transformComponent mem
bers"); |
41 | 41 |
42 </script> | 42 </script> |
43 | 43 |
44 <body> | 44 <body> |
45 </body> | 45 </body> |
OLD | NEW |