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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/resources/geometry-interfaces-test-helpers.js

Issue 2423753002: [GeometryInterface] add transformPoint(point) function. (Closed)
Patch Set: update test msg. 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 unified diff | Download patch
OLDNEW
1 function assert_identity_2d_matrix(actual) { 1 function assert_identity_2d_matrix(actual) {
2 assert_true(actual instanceof DOMMatrixReadOnly); 2 assert_true(actual instanceof DOMMatrixReadOnly);
3 assert_true(actual.is2D, "is2D"); 3 assert_true(actual.is2D, "is2D");
4 assert_true(actual.isIdentity, "isIdentity"); 4 assert_true(actual.isIdentity, "isIdentity");
5 assert_identity_matrix(actual); 5 assert_identity_matrix(actual);
6 } 6 }
7 7
8 function assert_identity_3d_matrix(actual) { 8 function assert_identity_3d_matrix(actual) {
9 assert_true(actual instanceof DOMMatrixReadOnly); 9 assert_true(actual instanceof DOMMatrixReadOnly);
10 assert_false(actual.is2D, "is2D"); 10 assert_false(actual.is2D, "is2D");
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 function assert_array_almost_equals(actual, expected) { 57 function assert_array_almost_equals(actual, expected) {
58 for (var i = 0; i < actual.length; i++) { 58 for (var i = 0; i < actual.length; i++) {
59 assert_equals(actual[i].toFixed(10), expected[i].toFixed(10)); 59 assert_equals(actual[i].toFixed(10), expected[i].toFixed(10));
60 } 60 }
61 } 61 }
62 62
63 function assert_matrix_almost_equals(actual, expected) { 63 function assert_matrix_almost_equals(actual, expected) {
64 assert_array_almost_equals(actual.toFloat64Array(), expected.toFloat64Array()) ; 64 assert_array_almost_equals(actual.toFloat64Array(), expected.toFloat64Array()) ;
65 } 65 }
66
67 function assert_point_equals(actual, expected) {
68 assert_equals(actual.x, expected.x, "point equality: x differs");
69 assert_equals(actual.y, expected.y, "point equality: y differs");
70 assert_equals(actual.z, expected.z, "point equality: z differs");
71 assert_equals(actual.w, expected.w, "point equality: w differs");
72 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698