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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point-readonly.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point-readonly.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point-readonly.html b/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point-readonly.html
index c71e8e194dfe1699f5583555480c11e516f7fde9..4d0933660b2ed7a586173a833a2b7e2fd7edab85 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point-readonly.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point-readonly.html
@@ -21,4 +21,24 @@ test(() => {
assert_readonly(point, 'w');
}, 'DOMPointReadOnly readonly test');
-</script>
+test(() => {
+ var point = DOMPointReadOnly.fromPoint({x: 1, y: 2, z: 3, w: 4});
+ assert_dom_point_equals(point, [1, 2, 3, 4]);
+}, 'DOMPointReadOnly.fromPoint({x: 1, y: 2, z: 3, w: 4}) should create a DOMPointReadOnly');
+
+test(() => {
+ var point = DOMPointReadOnly.fromPoint();
+ assert_dom_point_equals(point, [0, 0, 0, 1]);
+}, 'DOMPointReadOnly.fromPoint() should create a DOMPointReadOnly');
+
+test(() => {
+ var point1 = DOMPointReadOnly.fromPoint();
+ var point2 = DOMPointReadOnly.fromPoint();
+ assert_false(point1 == point2);
+ assert_true(point1.x == point2.x);
+ assert_true(point1.y == point2.y);
+ assert_true(point1.z == point2.z);
+ assert_true(point1.w == point2.w);
+}, 'DOMPointReadOnly.fromPoint() should create a new DOMPointReadOnly');
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698