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

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

Issue 2586083002: Adding fromPoint to DOMPoint and DOMPointReadOnly interfaces following spec. (Closed)
Patch Set: Adding fromPoint to DOMPoint and DOMPointReadOnly interfaces following spec. Created 4 years 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/LayoutTests/fast/dom/geometry-interfaces-dom-point-readonly.html » ('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 <meta charset="utf-8"> 2 <meta charset="utf-8">
3 <title>Geometry Interfaces: DOMPoint</title> 3 <title>Geometry Interfaces: DOMPoint</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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 test(() => { 56 test(() => {
57 var point = new DOMPoint(); 57 var point = new DOMPoint();
58 point.x = 10; 58 point.x = 10;
59 point.y = 20; 59 point.y = 20;
60 point.z = 30; 60 point.z = 30;
61 point.w = 40; 61 point.w = 40;
62 assert_dom_point_equals(point, [10, 20, 30, 40]); 62 assert_dom_point_equals(point, [10, 20, 30, 40]);
63 }, 'DOMPoint setter'); 63 }, 'DOMPoint setter');
64 64
65 </script> 65 test(() => {
66 var point = DOMPoint.fromPoint({x: 1, y: 2, z: 3, w: 4});
67 assert_dom_point_equals(point, [1, 2, 3, 4]);
68 }, 'DOMPoint.fromPoint({x: 1, y: 2, z: 3, w: 4}) should create a DOMPoint');
69
70 test(() => {
71 var point = DOMPoint.fromPoint();
72 assert_dom_point_equals(point, [0, 0, 0, 1]);
73 }, 'DOMPoint.fromPoint() should create a DOMPoint');
74
75 test(() => {
76 var point1 = DOMPoint.fromPoint();
77 var point2 = DOMPoint.fromPoint();
78 assert_false(point1 == point2);
79 assert_true(point1.x == point2.x);
80 assert_true(point1.y == point2.y);
81 assert_true(point1.z == point2.z);
82 assert_true(point1.w == point2.w);
83 }, 'DOMPoint.fromPoint() should create a new DOMPoint');
84
85 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point-readonly.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698