| Index: third_party/WebKit/LayoutTests/typedcssom/cssSkew.html
|
| diff --git a/third_party/WebKit/LayoutTests/typedcssom/cssSkew.html b/third_party/WebKit/LayoutTests/typedcssom/cssSkew.html
|
| index c526903899b136ff65c87fe31d1ab7a1ad52c6bf..285325464dbe559e087254fcf8fde96f538ff8f2 100644
|
| --- a/third_party/WebKit/LayoutTests/typedcssom/cssSkew.html
|
| +++ b/third_party/WebKit/LayoutTests/typedcssom/cssSkew.html
|
| @@ -55,10 +55,10 @@ test(function() {
|
| assert_true(inputAsMatrix.is2D());
|
| var tanAx = tanDegrees(input.ax.degrees);
|
| var tanAy = tanDegrees(input.ay.degrees);
|
| - var expectedMatrix = new CSSMatrixComponent(1, tanAy, tanAx, 1, 0, 0);
|
| + var expectedMatrix = new CSSMatrixComponent(new DOMMatrixReadOnly([1, tanAy, tanAx, 1, 0, 0]));
|
| for (var attribute in expectedMatrix) {
|
| - if (typeof expectedMatrix[attribute] === "number") {
|
| - assert_approx_equals(inputAsMatrix[attribute], expectedMatrix[attribute], EPSILON);
|
| + if (attribute == "matrix") {
|
| + assert_matrix_approx_equals(inputAsMatrix[attribute], expectedMatrix[attribute]);
|
| } else {
|
| assert_equals(inputAsMatrix[attribute], expectedMatrix[attribute]);
|
| }
|
| @@ -66,4 +66,14 @@ test(function() {
|
| }
|
| }, "asMatrix is constructed correctly for CSSSkew.");
|
|
|
| +function assert_array_approx_equals(actual, expected) {
|
| + for (var i = 0; i < actual.length; i++) {
|
| + assert_approx_equals(actual[i], expected[i], EPSILON);
|
| + }
|
| +}
|
| +
|
| +function assert_matrix_approx_equals(actual, expected) {
|
| + assert_array_approx_equals(actual.toFloat64Array(), expected.toFloat64Array());
|
| +}
|
| +
|
| </script>
|
|
|