Index: third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly-flip.html |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly-flip.html b/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly-flip.html |
index 53199a0a94da68d0c75a8e8cb9161a8458f456de..d393edeeb39d4ef61a30740fa5c4080a2d0ed9f7 100644 |
--- a/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly-flip.html |
+++ b/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly-flip.html |
@@ -1,79 +1,29 @@ |
<!DOCTYPE HTML> |
-<html> |
-<head> |
-<title>Geometry Interfaces: DOMMatrixReadOnly flip</title> |
<script src="../../resources/testharness.js"></script> |
<script src="../../resources/testharnessreport.js"></script> |
-</head> |
-<body> |
+<script src="./resources/geometry-interfaces-test-helpers.js"></script> |
<script> |
test(function() { |
- var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 3.1, 2, 1]); |
- var flipX = matrix2d.flipX(); |
- assert_true(flipX.is2D); |
- assert_equals(flipX.a, -1); |
- assert_equals(flipX.b, -2); |
- assert_equals(flipX.c, 3); |
- assert_equals(flipX.d, 3.1); |
- assert_equals(flipX.e, 2); |
- assert_equals(flipX.f, 1); |
+ var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 3.1, 2, 1]); |
+ var flipX = matrix2d.flipX(); |
+ assert_2d_matrix_equals(flipX, [-1, -2, 3, 3.1, 2, 1]); |
}, "DOMMatrixReadOnly flipX - 2D matrix"); |
test(function() { |
- var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]); |
- var flipX = matrix3d.flipX(); |
- assert_false(flipX.is2D); |
- assert_equals(flipX.m11, -1); |
- assert_equals(flipX.m12, -2); |
- assert_equals(flipX.m13, -3); |
- assert_equals(flipX.m14, -4); |
- assert_equals(flipX.m21, 5); |
- assert_equals(flipX.m22, 6); |
- assert_equals(flipX.m23, 7); |
- assert_equals(flipX.m24, 8); |
- assert_equals(flipX.m31, 9); |
- assert_equals(flipX.m32, 10.1); |
- assert_equals(flipX.m33, 11); |
- assert_equals(flipX.m34, 12); |
- assert_equals(flipX.m41, 13); |
- assert_equals(flipX.m42, 14); |
- assert_equals(flipX.m43, 15); |
- assert_equals(flipX.m44, 16.6); |
+ var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]); |
+ var flipX = matrix3d.flipX(); |
+ assert_3d_matrix_equals(flipX, [-1, -2, -3, -4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]); |
}, "DOMMatrixReadOnly flipX - 3D matrix"); |
test(function() { |
- var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 3.1, 2, 1]); |
- var flipY = matrix2d.flipY(); |
- assert_true(flipY.is2D); |
- assert_equals(flipY.a, 1); |
- assert_equals(flipY.b, 2); |
- assert_equals(flipY.c, -3); |
- assert_equals(flipY.d, -3.1); |
- assert_equals(flipY.e, 2); |
- assert_equals(flipY.f, 1); |
+ var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 3.1, 2, 1]); |
+ var flipY = matrix2d.flipY(); |
+ assert_2d_matrix_equals(flipY, [1, 2, -3, -3.1, 2, 1]); |
}, "DOMMatrixReadOnly flipY - 2D matrix"); |
test(function() { |
- var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]); |
- var flipY = matrix3d.flipY(); |
- assert_false(flipY.is2D); |
- assert_equals(flipY.m11, 1); |
- assert_equals(flipY.m12, 2); |
- assert_equals(flipY.m13, 3); |
- assert_equals(flipY.m14, 4); |
- assert_equals(flipY.m21, -5); |
- assert_equals(flipY.m22, -6); |
- assert_equals(flipY.m23, -7); |
- assert_equals(flipY.m24, -8); |
- assert_equals(flipY.m31, 9); |
- assert_equals(flipY.m32, 10.1); |
- assert_equals(flipY.m33, 11); |
- assert_equals(flipY.m34, 12); |
- assert_equals(flipY.m41, 13); |
- assert_equals(flipY.m42, 14); |
- assert_equals(flipY.m43, 15); |
- assert_equals(flipY.m44, 16.6); |
+ var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]); |
+ var flipY = matrix3d.flipY(); |
+ assert_3d_matrix_equals(flipY, [1, 2, 3, 4, -5, -6, -7, -8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]); |
}, "DOMMatrixReadOnly flipY - 3D matrix"); |
</script> |
-</body> |
-</html> |