Chromium Code Reviews| Index: LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html |
| diff --git a/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html b/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html |
| index db3bbd4c8008f5f0689d4648d404c050125e3c4c..7f2596f08f868f1d93cbc8093936bd1d47bbbc18 100644 |
| --- a/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html |
| +++ b/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html |
| @@ -2,114 +2,110 @@ |
| <html> |
| <head> |
| <title>Geometry Interfaces: DOMMatrix</title> |
| -<script src="../../resources/js-test.js"></script> |
| +<script src="../../resources/testharness.js"></script> |
| </head> |
| <body> |
| <script> |
| -debug("# DOMMatrix()"); |
| -var matrix = new DOMMatrix(); |
| -shouldBe("matrix.a", "matrix.m11"); |
| -shouldBe("matrix.b", "matrix.m12"); |
| -shouldBe("matrix.c", "matrix.m21"); |
| -shouldBe("matrix.d", "matrix.m22"); |
| -shouldBe("matrix.e", "matrix.m41"); |
| -shouldBe("matrix.f", "matrix.m42"); |
| -shouldBe("matrix.m11", "1"); |
| -shouldBe("matrix.m12", "0"); |
| -shouldBe("matrix.m13", "0"); |
| -shouldBe("matrix.m14", "0"); |
| -shouldBe("matrix.m21", "0"); |
| -shouldBe("matrix.m22", "1"); |
| -shouldBe("matrix.m23", "0"); |
| -shouldBe("matrix.m24", "0"); |
| -shouldBe("matrix.m31", "0"); |
| -shouldBe("matrix.m32", "0"); |
| -shouldBe("matrix.m33", "1"); |
| -shouldBe("matrix.m34", "0"); |
| -shouldBe("matrix.m41", "0"); |
| -shouldBe("matrix.m42", "0"); |
| -shouldBe("matrix.m43", "0"); |
| -shouldBe("matrix.m44", "1"); |
| -shouldBeTrue("matrix.is2D"); |
| -shouldBeTrue("matrix.isIdentity"); |
| -debug(""); |
| +test(function() { |
| + var matrix = new DOMMatrix(); |
| + assert_equals(matrix.m11, 1); |
| + assert_equals(matrix.m12, 0); |
| + assert_equals(matrix.m13, 0); |
| + assert_equals(matrix.m14, 0); |
| + assert_equals(matrix.m21, 0); |
| + assert_equals(matrix.m22, 1); |
| + assert_equals(matrix.m23, 0); |
| + assert_equals(matrix.m24, 0); |
| + assert_equals(matrix.m31, 0); |
| + assert_equals(matrix.m32, 0); |
| + assert_equals(matrix.m33, 1); |
| + assert_equals(matrix.m34, 0); |
| + assert_equals(matrix.m41, 0); |
| + assert_equals(matrix.m42, 0); |
| + assert_equals(matrix.m43, 0); |
| + assert_equals(matrix.m44, 1); |
| + assert_true(matrix.is2D); |
| + assert_true(matrix.isIdentity); |
| +}, "DOMMatrix() constructor"); |
| -debug("# DOMMatrix set attributes"); |
| -matrix.a = 10; |
| -matrix.b = 20; |
| -matrix.m24 = 2; |
| -matrix.m33 = 3; |
| -matrix.m42 = 3; |
| -matrix.m44 = 9; |
| -shouldBe("matrix.a", "matrix.m11"); |
|
pdr.
2014/08/25 01:54:08
Why did you remove these tests (e.g., matrix.a ==
zino
2014/08/25 05:43:37
The test cases is still checked in |DOMMatrix attr
|
| -shouldBe("matrix.b", "matrix.m12"); |
| -shouldBe("matrix.c", "matrix.m21"); |
| -shouldBe("matrix.d", "matrix.m22"); |
| -shouldBe("matrix.e", "matrix.m41"); |
| -shouldBe("matrix.f", "matrix.m42"); |
| -shouldBe("matrix.m11", "10"); |
| -shouldBe("matrix.m12", "20"); |
| -shouldBe("matrix.m13", "0"); |
| -shouldBe("matrix.m14", "0"); |
| -shouldBe("matrix.m21", "0"); |
| -shouldBe("matrix.m22", "1"); |
| -shouldBe("matrix.m23", "0"); |
| -shouldBe("matrix.m24", "2"); |
| -shouldBe("matrix.m31", "0"); |
| -shouldBe("matrix.m32", "0"); |
| -shouldBe("matrix.m33", "3"); |
| -shouldBe("matrix.m34", "0"); |
| -shouldBe("matrix.m41", "0"); |
| -shouldBe("matrix.m42", "3"); |
| -shouldBe("matrix.m43", "0"); |
| -shouldBe("matrix.m44", "9"); |
| -shouldBeFalse("matrix.is2D"); |
| -shouldBeFalse("matrix.isIdentity"); |
| -debug(""); |
| +test(function() { |
| + var other = new DOMMatrix(); |
| + other.m11 = 10; |
| + other.m12 = 20; |
| + other.m24 = 2; |
| + other.m33 = 3; |
| + other.m42 = 3; |
| + other.m44 = 9; |
| -debug("# DOMMatrix(other)"); |
| -var other = matrix; |
| -matrix = new DOMMatrix(other); |
| -shouldBe("matrix.a", "matrix.m11"); |
| -shouldBe("matrix.b", "matrix.m12"); |
| -shouldBe("matrix.c", "matrix.m21"); |
| -shouldBe("matrix.d", "matrix.m22"); |
| -shouldBe("matrix.e", "matrix.m41"); |
| -shouldBe("matrix.f", "matrix.m42"); |
| -shouldBe("matrix.m11", "10"); |
| -shouldBe("matrix.m12", "20"); |
| -shouldBe("matrix.m13", "0"); |
| -shouldBe("matrix.m14", "0"); |
| -shouldBe("matrix.m21", "0"); |
| -shouldBe("matrix.m22", "1"); |
| -shouldBe("matrix.m23", "0"); |
| -shouldBe("matrix.m24", "2"); |
| -shouldBe("matrix.m31", "0"); |
| -shouldBe("matrix.m32", "0"); |
| -shouldBe("matrix.m33", "3"); |
| -shouldBe("matrix.m34", "0"); |
| -shouldBe("matrix.m41", "0"); |
| -shouldBe("matrix.m42", "3"); |
| -shouldBe("matrix.m43", "0"); |
| -shouldBe("matrix.m44", "9"); |
| -shouldBeFalse("matrix.is2D"); |
| -shouldBeFalse("matrix.isIdentity"); |
| -debug(""); |
| + var matrix = new DOMMatrix(other); |
| + assert_equals(matrix.m11, 10); |
| + assert_equals(matrix.m12, 20); |
| + assert_equals(matrix.m13, 0); |
| + assert_equals(matrix.m14, 0); |
| + assert_equals(matrix.m21, 0); |
| + assert_equals(matrix.m22, 1); |
| + assert_equals(matrix.m23, 0); |
| + assert_equals(matrix.m24, 2); |
| + assert_equals(matrix.m31, 0); |
| + assert_equals(matrix.m32, 0); |
| + assert_equals(matrix.m33, 3); |
| + assert_equals(matrix.m34, 0); |
| + assert_equals(matrix.m41, 0); |
| + assert_equals(matrix.m42, 3); |
| + assert_equals(matrix.m43, 0); |
| + assert_equals(matrix.m44, 9); |
| + assert_false(matrix.is2D); |
| + assert_false(matrix.isIdentity); |
| +}, "DOMMatrix(other) constructor"); |
| -debug("# DOMMatrix.is2D can never be set to 'true' when it was set to 'false' before calling setMatrixValue()."); |
| -matrix = new DOMMatrix(); |
| -shouldBeTrue("matrix.is2D"); |
| -shouldBeTrue("matrix.isIdentity"); |
| -matrix.m31 = 1; |
| -matrix.m33 = 0; |
| -shouldBeFalse("matrix.is2D"); |
| -shouldBeFalse("matrix.isIdentity"); |
| -matrix.m31 = 0; |
| -matrix.m33 = 1; |
| -shouldBeFalse("matrix.is2D"); |
| -shouldBeTrue("matrix.isIdentity"); |
| -debug(""); |
| +test(function() { |
| + var matrix = new DOMMatrix(); |
| + matrix.a = 10; |
| + matrix.b = 20; |
| + matrix.m24 = 2; |
| + matrix.m33 = 3; |
| + matrix.m42 = 3; |
| + matrix.m44 = 9; |
| + assert_equals(matrix.a, matrix.m11); |
| + assert_equals(matrix.b, matrix.m12); |
| + assert_equals(matrix.c, matrix.m21); |
| + assert_equals(matrix.d, matrix.m22); |
| + assert_equals(matrix.e, matrix.m41); |
| + assert_equals(matrix.f, matrix.m42); |
| + assert_equals(matrix.m11, 10); |
| + assert_equals(matrix.m12, 20); |
| + assert_equals(matrix.m13, 0); |
| + assert_equals(matrix.m14, 0); |
| + assert_equals(matrix.m21, 0); |
| + assert_equals(matrix.m22, 1); |
| + assert_equals(matrix.m23, 0); |
| + assert_equals(matrix.m24, 2); |
| + assert_equals(matrix.m31, 0); |
| + assert_equals(matrix.m32, 0); |
| + assert_equals(matrix.m33, 3); |
| + assert_equals(matrix.m34, 0); |
| + assert_equals(matrix.m41, 0); |
| + assert_equals(matrix.m42, 3); |
| + assert_equals(matrix.m43, 0); |
| + assert_equals(matrix.m44, 9); |
| + assert_false(matrix.is2D); |
| + assert_false(matrix.isIdentity); |
| +}, "DOMMatrix attributes"); |
| + |
| +test(function() { |
| + var matrix = new DOMMatrix(); |
| + assert_true(matrix.is2D); |
| + assert_true(matrix.isIdentity); |
| + matrix.m31 = 1; |
| + matrix.m33 = 0; |
| + assert_false(matrix.is2D); |
| + assert_false(matrix.isIdentity); |
| + matrix.m31 = 0; |
| + matrix.m33 = 1; |
| + assert_false(matrix.is2D); |
| + assert_true(matrix.isIdentity); |
| +}, "DOMMatrix.is2D can never be set to 'true' when it was set to 'false' before calling setMatrixValue()."); |
| </script> |
| </body> |