| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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> |
| OLD | NEW |