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

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

Issue 2365153002: [GeometryInterface] Add rotateAxisAngle*(x,y,z,angle) function. (Closed)
Patch Set: update test. Created 4 years, 2 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 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 assert_equals(16, expected.length, "expected.length"); 46 assert_equals(16, expected.length, "expected.length");
47 assert_false(actual.is2D, "is2D"); 47 assert_false(actual.is2D, "is2D");
48 assert_false(actual.isIdentity, "isIdentity"); 48 assert_false(actual.isIdentity, "isIdentity");
49 assert_array_equals(toArray(actual), [ 49 assert_array_equals(toArray(actual), [
50 expected[0], expected[1], expected[2], expected[3], 50 expected[0], expected[1], expected[2], expected[3],
51 expected[4], expected[5], expected[6], expected[7], 51 expected[4], expected[5], expected[6], expected[7],
52 expected[8], expected[9], expected[10], expected[11], 52 expected[8], expected[9], expected[10], expected[11],
53 expected[12], expected[13], expected[14], expected[15], 53 expected[12], expected[13], expected[14], expected[15],
54 ]); 54 ]);
55 } 55 }
56
57 function assert_array_almost_equals(actual, expected) {
58 for (var i = 0; i < actual.length; i++) {
59 assert_equals(actual[i].toFixed(10), expected[i].toFixed(10));
60 }
61 }
62
63 function assert_matrix_almost_equals(actual, expected) {
64 assert_array_almost_equals(actual.toFloat64Array(), expected.toFloat64Array()) ;
65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698