Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/transforms/cssmatrix-2d-interface.xhtml |
| diff --git a/third_party/WebKit/LayoutTests/transforms/cssmatrix-2d-interface.xhtml b/third_party/WebKit/LayoutTests/transforms/cssmatrix-2d-interface.xhtml |
| index cc8553662e791244941502374dd6c60479f83140..ed7b00cc1487bc4dd93cb6b40927e6caf93f9806 100644 |
| --- a/third_party/WebKit/LayoutTests/transforms/cssmatrix-2d-interface.xhtml |
| +++ b/third_party/WebKit/LayoutTests/transforms/cssmatrix-2d-interface.xhtml |
| @@ -255,7 +255,12 @@ debug(""); |
| debug("Test multiply with missing argument"); |
| m = new WebKitCSSMatrix("matrix(1, 2, 3, 4, 5, 6)"); |
| m2 = m.multiply(); |
| -shouldBe('m2', 'null'); |
| +shouldBe('m2.a', '1'); |
| +shouldBe('m2.b', '2'); |
| +shouldBe('m2.c', '3'); |
| +shouldBe('m2.d', '4'); |
| +shouldBe('m2.e', '5'); |
| +shouldBe('m2.f', '6'); |
| debug(""); |
| debug("Test inverse"); |
| @@ -279,9 +284,25 @@ shouldBe('parseFloat(m.e)', '10'); |
| shouldBe('parseFloat(m.f)', '20'); |
| debug(""); |
| -debug("Test throwing exception from inverse"); |
| +debug("Test not invertible matrix"); |
|
zino
2017/05/15 19:07:35
Test for non-invertible matrix.
|
| m = new WebKitCSSMatrix("matrix(0, 0, 0, 0, 0, 0)"); // not invertible |
| -shouldThrow('m.inverse()'); |
| +m2 = m.inverse(); |
| + |
| +shouldBeNaN('m2.a'); |
| +shouldBeNaN('m2.b'); |
| +shouldBeNaN('m2.c'); |
| +shouldBeNaN('m2.d'); |
| +shouldBeNaN('m2.e'); |
| +shouldBeNaN('m2.f'); |
| + |
| +debug(""); |
| +debug("Test immutability of inverse"); |
| +shouldBe('m.a', '0'); |
| +shouldBe('m.b', '0'); |
| +shouldBe('m.c', '0'); |
| +shouldBe('m.d', '0'); |
| +shouldBe('m.e', '0'); |
| +shouldBe('m.f', '0'); |
| debug(""); |