Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Geometry Interfaces: DOMMatrixReadOnly</title> | 4 <title>Geometry Interfaces: DOMMatrixReadOnly</title> |
| 5 <script src="../../resources/testharness.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
| 6 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="../../resources/testharnessreport.js"></script> |
| 7 </head> | 7 </head> |
| 8 <body> | 8 <body> |
| 9 <script> | 9 <script> |
| 10 test(function() { | 10 test(function() { |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 assert_equals(matrix3d.m32, 10.1); | 33 assert_equals(matrix3d.m32, 10.1); |
| 34 assert_equals(matrix3d.m33, 11); | 34 assert_equals(matrix3d.m33, 11); |
| 35 assert_equals(matrix3d.m34, 12); | 35 assert_equals(matrix3d.m34, 12); |
| 36 assert_equals(matrix3d.m41, 13); | 36 assert_equals(matrix3d.m41, 13); |
| 37 assert_equals(matrix3d.m42, 14); | 37 assert_equals(matrix3d.m42, 14); |
| 38 assert_equals(matrix3d.m43, 15); | 38 assert_equals(matrix3d.m43, 15); |
| 39 assert_equals(matrix3d.m44, 16.6); | 39 assert_equals(matrix3d.m44, 16.6); |
| 40 }, "DOMMatrixReadOnly constructor - 3D matrix"); | 40 }, "DOMMatrixReadOnly constructor - 3D matrix"); |
| 41 | 41 |
| 42 test(function() { | 42 test(function() { |
| 43 var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 3.1, 2, 1]); | |
| 44 assert_true(matrix2d.is2D); | |
| 45 assert_equals(matrix2d.toString(), "matrix(1, 2, 3, 2, 1)"); | |
|
pdr.
2016/08/23 18:00:55
Should this be "matrix(1, 2, 3, 2, 1)" instead of
Hwanseung Lee
2016/08/23 21:35:01
it was missing about d(). it was fixed.
| |
| 46 }, "DOMMatrixReadOnly toString() - 2D matrix"); | |
| 47 | |
| 48 test(function() { | |
| 49 var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 1 2, 13, 14, 15, 16.6]); | |
| 50 assert_false(matrix3d.is2D); | |
| 51 assert_equals(matrix3d.toString(), "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1 , 11, 12, 13, 14, 15, 16.6)"); | |
| 52 }, "DOMMatrixReadOnly toString() - 3D matrix"); | |
| 53 | |
| 54 test(function() { | |
| 43 assert_throws(new TypeError(), function() { new DOMMatrixReadOnly(1, 2, 3, 4 , 5, 6); }, | 55 assert_throws(new TypeError(), function() { new DOMMatrixReadOnly(1, 2, 3, 4 , 5, 6); }, |
| 44 "DOMMatrixReadOnly constructor only accepts 1 argument"); | 56 "DOMMatrixReadOnly constructor only accepts 1 argument"); |
| 45 assert_throws(new TypeError(), function() { new DOMMatrixReadOnly("myString" ); }, | 57 assert_throws(new TypeError(), function() { new DOMMatrixReadOnly("myString" ); }, |
| 46 "DOMMatrixReadOnly constructor only accepts 1 number sequence"); | 58 "DOMMatrixReadOnly constructor only accepts 1 number sequence"); |
| 47 assert_throws(new TypeError(), function() { new DOMMatrixReadOnly([1, 2, 3]) ; }, | 59 assert_throws(new TypeError(), function() { new DOMMatrixReadOnly([1, 2, 3]) ; }, |
| 48 "DOMMatrixReadOnly constructor only accepts 1 number sequence with 6 or 16 elements."); | 60 "DOMMatrixReadOnly constructor only accepts 1 number sequence with 6 or 16 elements."); |
| 49 }, "DOMMatrixReadOnly constructor - invalid arguments"); | 61 }, "DOMMatrixReadOnly constructor - invalid arguments"); |
| 50 </script> | 62 </script> |
| 51 </body> | 63 </body> |
| 52 </html> | 64 </html> |
| OLD | NEW |