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

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

Issue 2260393002: add FlipX() and FlipY() funtion in DOMMatrixReadOnly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add FlipX() and FlipY() funtion in DOMMatrixReadOnly. Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..53199a0a94da68d0c75a8e8cb9161a8458f456de
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly-flip.html
@@ -0,0 +1,79 @@
+<!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>
+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);
+}, "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);
+}, "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);
+}, "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);
+}, "DOMMatrixReadOnly flipY - 3D matrix");
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698