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

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

Issue 2846523002: Update the stringifier behavior for DOMMatrixReadOnly (Closed)
Patch Set: Update the stringifier behavior for DOMMatrixReadOnly Created 3 years, 7 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
Index: third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html b/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html
index 3aa6eb358c3138d8f104cb834b9c9a7b01cd0237..ba1de9b5873772b9b56c49ffce943b6c862b65b6 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html
@@ -60,19 +60,30 @@ test(() => {
}, "DOMMatrixReadOnly(transformList) - transformList");
test(() => {
- var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 3.1, 2, 1]);
+ var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 3.1, 2, 1.123456789]);
assert_true(matrix2d.is2D);
- assert_equals(matrix2d.toString(), "matrix(1, 2, 3, 3.1, 2, 1)");
+ assert_equals(matrix2d.toString(), "matrix(1, 2, 3, 3.1, 2, 1.123456789)");
}, "DOMMatrixReadOnly toString() - 2D matrix");
test(() => {
- var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]);
+ var matrix2d = new DOMMatrixReadOnly([NaN, Infinity, NaN, Infinity, NaN, Infinity]);
+ assert_true(matrix2d.is2D);
+ assert_equals(matrix2d.toString(), "matrix(NaN, Infinity, NaN, Infinity, NaN, Infinity)");
+}, "DOMMatrixReadOnly toString() - 2D matrix with NaN and Infinity");
+
+test(() => {
+ var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.123456789]);
assert_false(matrix3d.is2D);
- assert_equals(matrix3d.toString(), "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6)");
+ assert_equals(matrix3d.toString(), "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.123456789)");
}, "DOMMatrixReadOnly toString() - 3D matrix");
test(() => {
- var identity_matrix = DOMMatrixReadOnly.fromMatrix();
+ var matrix3d = new DOMMatrixReadOnly([NaN, Infinity, NaN, Infinity, NaN, Infinity, NaN, Infinity, NaN, Infinity, NaN, Infinity, NaN, Infinity, NaN, Infinity]);
+ assert_false(matrix3d.is2D);
+ assert_equals(matrix3d.toString(), "matrix3d(NaN, Infinity, NaN, Infinity, NaN, Infinity, NaN, Infinity, NaN, Infinity, NaN, Infinity, NaN, Infinity, NaN, Infinity)");
+}, "DOMMatrixReadOnly toString() - 3D matrix with NaN and Infinity");
+
+test(() => { var identity_matrix = DOMMatrixReadOnly.fromMatrix();
assert_true(identity_matrix.is2D);
assert_object_equals(identity_matrix.toJSON(),
{ a : 1, b : 0, c : 0, d : 1, e : 0, f : 0,

Powered by Google App Engine
This is Rietveld 408576698