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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point.html b/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point.html
index 9c6fa14c5a512660b9e214d435f3dcdd50e658c1..18fec6a0f169afc51c450751f47f65b96afb90c8 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point.html
@@ -62,4 +62,24 @@ test(() => {
assert_dom_point_equals(point, [10, 20, 30, 40]);
}, 'DOMPoint setter');
-</script>
+test(() => {
+ var point = DOMPoint.fromPoint({x: 1, y: 2, z: 3, w: 4});
+ assert_dom_point_equals(point, [1, 2, 3, 4]);
+}, 'DOMPoint.fromPoint({x: 1, y: 2, z: 3, w: 4}) should create a DOMPoint');
+
+test(() => {
+ var point = DOMPoint.fromPoint();
+ assert_dom_point_equals(point, [0, 0, 0, 1]);
+}, 'DOMPoint.fromPoint() should create a DOMPoint');
+
+test(() => {
+ var point1 = DOMPoint.fromPoint();
+ var point2 = DOMPoint.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);
+}, 'DOMPoint.fromPoint() should create a new DOMPoint');
+
+</script>
« 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