OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <meta charset="utf-8"> | 2 <meta charset="utf-8"> |
3 <title>Geometry Interfaces: DOMPointReadOnly</title> | 3 <title>Geometry Interfaces: DOMPointReadOnly</title> |
4 <link rel="help" href="https://drafts.fxtf.org/geometry/#DOMPoint"> | 4 <link rel="help" href="https://drafts.fxtf.org/geometry/#DOMPoint"> |
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 <script src="./resources/geometry-interfaces-test-helpers.js"></script> | 7 <script src="./resources/geometry-interfaces-test-helpers.js"></script> |
8 <script> | 8 <script> |
9 'use strict'; | 9 'use strict'; |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 test(() => { | 59 test(() => { |
60 var point1 = DOMPointReadOnly.fromPoint(); | 60 var point1 = DOMPointReadOnly.fromPoint(); |
61 var point2 = DOMPointReadOnly.fromPoint(); | 61 var point2 = DOMPointReadOnly.fromPoint(); |
62 assert_false(point1 == point2); | 62 assert_false(point1 == point2); |
63 assert_dom_point_equals(point1, point2); | 63 assert_dom_point_equals(point1, point2); |
64 }, 'DOMPointReadOnly.fromPoint() should create a new DOMPointReadOnly'); | 64 }, 'DOMPointReadOnly.fromPoint() should create a new DOMPointReadOnly'); |
65 | 65 |
66 test(() => { | 66 test(() => { |
67 var point = new DOMPointReadOnly(5, 4); | 67 var point = new DOMPointReadOnly(5, 4); |
68 var transformed_point = point.matrixTransform(new DOMMatrixReadOnly([2, 0, 0,
2, 10, 10])); | 68 var transformed_point = point.matrixTransform(new DOMMatrixReadOnly([1, 2, 3,
4, 5, 6])); |
69 assert_dom_point_equals(transformed_point, new DOMPoint(20, 18)); | 69 assert_dom_point_equals(transformed_point, new DOMPoint(22, 32)); |
70 }, 'DOMMatrixReadOnly.matrixTransform() - 2d matrixTransform'); | 70 }, 'DOMMatrixReadOnly.matrixTransform() - 2d matrixTransform'); |
71 | 71 |
72 test(() => { | 72 test(() => { |
73 var point = new DOMPointReadOnly(5, 4); | 73 var point = new DOMPointReadOnly(5, 4); |
74 var transformed_point = point.matrixTransform(new DOMMatrixReadOnly([1, 2, 3,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])); | 74 var transformed_point = point.matrixTransform(new DOMMatrixReadOnly([1, 2, 3,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])); |
75 assert_dom_point_equals(transformed_point, new DOMPoint(38, 48, 58, 68)); | 75 assert_dom_point_equals(transformed_point, new DOMPoint(38, 48, 58, 68)); |
76 }, 'DOMMatrixReadOnly.matrixTransform() - 3d matrixTransform'); | 76 }, 'DOMMatrixReadOnly.matrixTransform() - 3d matrixTransform'); |
77 | 77 |
78 </script> | 78 </script> |
OLD | NEW |