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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-scale.html

Issue 2459363002: [GeometryInterface] parameter of scale3d*() 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/DOMMatrix.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="./resources/geometry-interfaces-test-helpers.js"></script> 4 <script src="./resources/geometry-interfaces-test-helpers.js"></script>
5 <script> 5 <script>
6 6
7 test(function() { 7 test(function() {
8 var matrix = new DOMMatrix(); 8 var matrix = new DOMMatrix();
9 assert_identity_2d_matrix(matrix); 9 assert_identity_2d_matrix(matrix);
10 var result = matrix.scale(); 10 var result = matrix.scale();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 var matrix = new DOMMatrix(); 49 var matrix = new DOMMatrix();
50 assert_identity_2d_matrix(matrix); 50 assert_identity_2d_matrix(matrix);
51 var result = matrix.scale(2, 3, 0.5, 2, -4, -1); 51 var result = matrix.scale(2, 3, 0.5, 2, -4, -1);
52 assert_3d_matrix_equals(result, [2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0.5, 0, -2, 8, -0.5, 1]); 52 assert_3d_matrix_equals(result, [2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0.5, 0, -2, 8, -0.5, 1]);
53 assert_identity_2d_matrix(matrix); 53 assert_identity_2d_matrix(matrix);
54 }, "DOMMatrix.scale(sx, sy, sz, ox, oy, oz)"); 54 }, "DOMMatrix.scale(sx, sy, sz, ox, oy, oz)");
55 55
56 test(function() { 56 test(function() {
57 var matrix = new DOMMatrix(); 57 var matrix = new DOMMatrix();
58 assert_identity_2d_matrix(matrix); 58 assert_identity_2d_matrix(matrix);
59 var result = matrix.scale3d();
60 assert_identity_2d_matrix(result);
61 assert_identity_2d_matrix(matrix);
62 }, "DOMMatrix.scale3d()");
63
64 test(function() {
65 var matrix = new DOMMatrix();
66 assert_identity_2d_matrix(matrix);
59 var result = matrix.scale3d(3); 67 var result = matrix.scale3d(3);
60 assert_3d_matrix_equals(result, [3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1]); 68 assert_3d_matrix_equals(result, [3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1]);
61 assert_identity_2d_matrix(matrix); 69 assert_identity_2d_matrix(matrix);
62 }, "DOMMatrix.scale3d(scale)"); 70 }, "DOMMatrix.scale3d(scale)");
63 71
64 test(function() { 72 test(function() {
65 var matrix = new DOMMatrix(); 73 var matrix = new DOMMatrix();
66 assert_identity_2d_matrix(matrix); 74 assert_identity_2d_matrix(matrix);
67 var result = matrix.scale3d(3, 2, 7, -1); 75 var result = matrix.scale3d(3, 2, 7, -1);
68 assert_3d_matrix_equals(result, [3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, -4, -14, 2, 1]); 76 assert_3d_matrix_equals(result, [3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, -4, -14, 2, 1]);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 146
139 test(function() { 147 test(function() {
140 var matrix = new DOMMatrix(); 148 var matrix = new DOMMatrix();
141 assert_identity_2d_matrix(matrix); 149 assert_identity_2d_matrix(matrix);
142 var result = matrix.scale3dSelf(3, 2, 7, -1); 150 var result = matrix.scale3dSelf(3, 2, 7, -1);
143 assert_3d_matrix_equals(result, [3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, -4, -14, 2, 1]); 151 assert_3d_matrix_equals(result, [3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, -4, -14, 2, 1]);
144 assert_equals(result, matrix, 'result and matrix should be the exact same obje ct'); 152 assert_equals(result, matrix, 'result and matrix should be the exact same obje ct');
145 }, "DOMMatrix.scale3dSelf(scale, ox, oy, oz)"); 153 }, "DOMMatrix.scale3dSelf(scale, ox, oy, oz)");
146 154
147 </script> 155 </script>
OLDNEW
« 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