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..ddd777185277123282f13254b63dcbdfcf82e998 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,55 @@ 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, NaN, NaN, NaN, NaN, NaN]); |
fserb
2017/05/18 17:10:54
tests like this are very misleading. Because you a
Byoungkwon Ko
2017/05/20 08:41:29
As you know, I am newbie for chromium.
I tried to
|
+ assert_true(matrix2d.is2D); |
+ assert_throws(null, () => { matrix2d.toString() }); |
+}, "DOMMatrixReadOnly toString() - 2D matrix with NaN"); |
+ |
+test(() => { |
+ var matrix2d = new DOMMatrixReadOnly([Infinity, Infinity, Infinity, Infinity, Infinity, Infinity]); |
+ assert_true(matrix2d.is2D); |
+ assert_throws(null, () => { matrix2d.toString() }); |
+}, "DOMMatrixReadOnly toString() - 2D matrix with Infinity"); |
+ |
+test(() => { |
+ var matrix2d = new DOMMatrixReadOnly([-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity]); |
+ assert_true(matrix2d.is2D); |
+ assert_throws(null, () => { matrix2d.toString() }); |
+}, "DOMMatrixReadOnly toString() - 2D matrix with -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, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN]); |
+ assert_false(matrix3d.is2D); |
+ assert_throws(null, () => { matrix3d.toString() }); |
+}, "DOMMatrixReadOnly toString() - 3D matrix with NaN"); |
+ |
+test(() => { |
+ var matrix3d = new DOMMatrixReadOnly([Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity]); |
+ assert_false(matrix3d.is2D); |
+ assert_throws(null, () => { matrix3d.toString() }); |
+}, "DOMMatrixReadOnly toString() - 3D matrix with Infinity"); |
+ |
+test(() => { |
+ var matrix3d = new DOMMatrixReadOnly([-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity]); |
+ assert_false(matrix3d.is2D); |
+ assert_throws(null, () => { matrix3d.toString() }); |
+}, "DOMMatrixReadOnly toString() - 3D matrix with -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, |