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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point-readonly.html

Issue 2600663002: Adding matrixTrasnform to DOMPointReadOnly interfaces as following spec. (Closed)
Patch Set: Adding matrixTrasnform to DOMPointReadOnly interfaces as following spec. Created 3 years, 12 months 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/webexposed/global-interface-listing-expected.txt » ('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-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 1c0ef51af372df8bb0a97628baff50241830431e..37294532980d38e59d53046aa87773ecb0febbfa 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
@@ -9,6 +9,26 @@
'use strict';
test(() => {
+ var point = new DOMPointReadOnly();
+ assert_dom_point_equals(point, [0, 0, 0, 1]);
+}, 'DOMPointReadOnly constructor without parameter');
+
+test(() => {
+ var point = new DOMPointReadOnly(10);
+ assert_dom_point_equals(point, [10, 0, 0, 1]);
+}, 'DOMPointReadOnly constructor with x parameter');
+
+test(() => {
+ var point = new DOMPointReadOnly(10, 20);
+ assert_dom_point_equals(point, [10, 20, 0, 1]);
+}, 'DOMPointReadOnly constructor with x, y parameters');
+
+test(() => {
+ var point = new DOMPointReadOnly(10, 20, 30);
+ assert_dom_point_equals(point, [10, 20, 30, 1]);
+}, 'DOMPointReadOnly constructor with x, y, z parameters');
+
+test(() => {
var point = new DOMPointReadOnly(10, 20, 30, 40);
assert_dom_point_equals(point, [10, 20, 30, 40]);
}, 'DOMPointReadOnly constructor with x, y, z, w parameters');
@@ -40,10 +60,19 @@ 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);
+ assert_dom_point_equals(point1, point2);
}, 'DOMPointReadOnly.fromPoint() should create a new DOMPointReadOnly');
+test(() => {
+ var point = new DOMPointReadOnly(5, 4);
+ var transformed_point = point.matrixTransform(new DOMMatrixReadOnly([2, 0, 0, 2, 10, 10]));
+ assert_dom_point_equals(transformed_point, new DOMPoint(20, 18));
+}, 'DOMMatrixReadOnly.matrixTransform() - 2d matrixTransform');
+
+test(() => {
+ var point = new DOMPointReadOnly(5, 4);
+ var transformed_point = point.matrixTransform(new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]));
+ assert_dom_point_equals(transformed_point, new DOMPoint(38, 48, 58, 68));
+}, 'DOMMatrixReadOnly.matrixTransform() - 3d matrixTransform');
+
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698