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

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

Issue 2461303003: [GeometryInterface] parameter of translate*() was changed. (Closed)
Patch Set: add test. Created 4 years, 1 month 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/Source/core/dom/DOMMatrix.h » ('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-translate.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-translate.html b/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-translate.html
index e65a0eea6a51417677ce28c540a750846290ab74..984ad636251e06b4299054139b5941e9d6283c8b 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-translate.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-translate.html
@@ -3,6 +3,23 @@
<script src="../../resources/testharnessreport.js"></script>
<script src="./resources/geometry-interfaces-test-helpers.js"></script>
<script>
+
+test(function() {
+ var matrix = new DOMMatrix();
+ assert_identity_2d_matrix(matrix);
+ var result = matrix.translate();
+ assert_identity_2d_matrix(result);
+ assert_identity_2d_matrix(matrix);
+}, "DOMMatrix.translate()");
+
+test(function() {
+ var matrix = new DOMMatrix();
+ assert_identity_2d_matrix(matrix);
+ var result = matrix.translate(6);
+ assert_2d_matrix_equals(result, [1, 0, 0, 1, 6, 0]);
+ assert_identity_2d_matrix(matrix);
+}, "DOMMatrix.translate(tx)");
+
test(function() {
var matrix = new DOMMatrix();
assert_identity_2d_matrix(matrix);
@@ -23,6 +40,22 @@ test(function() {
test(function() {
var matrix = new DOMMatrix();
assert_identity_2d_matrix(matrix);
+ var result = matrix.translateSelf();
+ assert_identity_2d_matrix(result);
+ assert_identity_2d_matrix(matrix);
+}, "DOMMatrix.translateSelf()");
+
+test(function() {
+ var matrix = new DOMMatrix();
+ assert_identity_2d_matrix(matrix);
+ var result = matrix.translateSelf(5);
+ assert_2d_matrix_equals(result, [1, 0, 0, 1, 5, 0]);
+ assert_2d_matrix_equals(matrix, [1, 0, 0, 1, 5, 0]);
+}, "DOMMatrix.translateSelf(tx)");
+
+test(function() {
+ var matrix = new DOMMatrix();
+ assert_identity_2d_matrix(matrix);
var result = matrix.translateSelf(4, 2);
assert_2d_matrix_equals(result, [1, 0, 0, 1, 4, 2]);
assert_2d_matrix_equals(matrix, [1, 0, 0, 1, 4, 2]);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/DOMMatrix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698