Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly-flip.html

Issue 2370623003: [GeometryInterface] Clean-up layout tests for geometry interfaces. (Closed)
Patch Set: [GeometryInterface] Fix a indentation and clean up. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698