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 var matrix2d = new DOMMatrix([5, 4, 11, 34, 55, 11]); | 7 var matrix2d = [5, 4, 11, 34, 55, 11]; |
8 var matrix3d = new DOMMatrix([5, 11, 55, 77, 44, 33, 55, 75, 88, 99, 12, 43, 65,
36, 85, 25]); | 8 var matrix3d = [5, 11, 55, 77, 44, 33, 55, 75, 88, 99, 12, 43, 65, 36, 85, 25]; |
9 | 9 |
10 test(() => { | 10 test(() => { |
11 var actualMatrix1 = new DOMMatrix(matrix2d); | 11 var actualMatrix1 = new DOMMatrix(matrix2d); |
12 var actualMatrix2 = new DOMMatrix(matrix3d); | 12 var actualMatrix2 = new DOMMatrix(matrix3d); |
13 var expectedMatrix = new DOMMatrix(); | 13 var expectedMatrix = new DOMMatrix(); |
14 actualMatrix1.setMatrixValue(""); | 14 actualMatrix1.setMatrixValue(""); |
15 assert_true(actualMatrix1.is2D); | 15 assert_true(actualMatrix1.is2D); |
16 assert_matrix_almost_equals(actualMatrix1, expectedMatrix); | 16 assert_matrix_almost_equals(actualMatrix1, expectedMatrix); |
17 actualMatrix2.setMatrixValue(""); | 17 actualMatrix2.setMatrixValue(""); |
18 assert_true(actualMatrix2.is2D); | 18 assert_true(actualMatrix2.is2D); |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 actualMatrix.setMatrixValue("translateX(calc(10px + 1em))"); | 284 actualMatrix.setMatrixValue("translateX(calc(10px + 1em))"); |
285 }, "Can't parse without absolute unit."); | 285 }, "Can't parse without absolute unit."); |
286 | 286 |
287 //actualMatrix should be not changed. | 287 //actualMatrix should be not changed. |
288 assert_true(actualMatrix.is2D); | 288 assert_true(actualMatrix.is2D); |
289 assert_matrix_almost_equals(actualMatrix, expectedMatrix); | 289 assert_matrix_almost_equals(actualMatrix, expectedMatrix); |
290 | 290 |
291 }, "DOMMatrix.setMatrix(): Exception test."); | 291 }, "DOMMatrix.setMatrix(): Exception test."); |
292 | 292 |
293 </script> | 293 </script> |
OLD | NEW |