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

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

Issue 2273663002: Implement toString() funtion in DOMMatrixReadOnly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: \ Created 4 years, 4 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 db5df89e2f031d9e207400f11f49ea820500cbff..1cc59ee2c22b42c7e6734d5b8c0e32dd5e571a9e 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
@@ -40,6 +40,18 @@ test(function() {
}, "DOMMatrixReadOnly constructor - 3D matrix");
test(function() {
+ var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 3.1, 2, 1]);
+ assert_true(matrix2d.is2D);
+ assert_equals(matrix2d.toString(), "matrix(1, 2, 3, 2, 1)");
pdr. 2016/08/23 18:00:55 Should this be "matrix(1, 2, 3, 2, 1)" instead of
Hwanseung Lee 2016/08/23 21:35:01 it was missing about d(). it was fixed.
+}, "DOMMatrixReadOnly toString() - 2D matrix");
+
+test(function() {
+ var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]);
+ 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)");
+}, "DOMMatrixReadOnly toString() - 3D matrix");
+
+test(function() {
assert_throws(new TypeError(), function() { new DOMMatrixReadOnly(1, 2, 3, 4, 5, 6); },
"DOMMatrixReadOnly constructor only accepts 1 argument");
assert_throws(new TypeError(), function() { new DOMMatrixReadOnly("myString"); },

Powered by Google App Engine
This is Rietveld 408576698