| 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 var EPSILON = 1e-6; // float epsilon | 6 var EPSILON = 1e-6; // float epsilon |
| 7 var values = [ | 7 var values = [ |
| 8 {input: new CSSScale(0, 0), x: 0, y: 0, z: 1, is2D: true, | 8 {input: new CSSScale(0, 0), x: 0, y: 0, z: 1, is2D: true, |
| 9 cssText: "scale(0, 0)"}, | 9 cssText: "scale(0, 0)"}, |
| 10 {input: new CSSScale(1, 2), x: 1, y: 2, z: 1, is2D: true, | 10 {input: new CSSScale(1, 2), x: 1, y: 2, z: 1, is2D: true, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 for (var attribute in expectedMatrix) { | 84 for (var attribute in expectedMatrix) { |
| 85 if (typeof expectedMatrix[attribute] === "number") { | 85 if (typeof expectedMatrix[attribute] === "number") { |
| 86 assert_approx_equals(inputAsMatrix[attribute], expectedMatrix[attribute]
, EPSILON); | 86 assert_approx_equals(inputAsMatrix[attribute], expectedMatrix[attribute]
, EPSILON); |
| 87 } else { | 87 } else { |
| 88 assert_equals(inputAsMatrix[attribute], expectedMatrix[attribute]); | 88 assert_equals(inputAsMatrix[attribute], expectedMatrix[attribute]); |
| 89 } | 89 } |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 }, "Test that asMatrix is constructed correctly for CSSScale."); | 92 }, "Test that asMatrix is constructed correctly for CSSScale."); |
| 93 | 93 |
| 94 test(function() { |
| 95 var actual = new CSSScale(0, 0, 0); |
| 96 actual.x = 1; |
| 97 actual.y = 2; |
| 98 actual.z = 3; |
| 99 assert_equals(actual.x, 1); |
| 100 assert_equals(actual.y, 2); |
| 101 assert_equals(actual.z, 3); |
| 102 }, "Test that x, y, z are mutable attributes."); |
| 94 </script> | 103 </script> |
| OLD | NEW |