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

Side by Side Diff: third_party/WebKit/LayoutTests/transforms/cssmatrix-2d-interface.xhtml

Issue 2943213002: Revert of Make WebKitCSSMatrix an alias of DOMMatrix (Closed)
Patch Set: Revert of Make WebKitCSSMatrix an alias of DOMMatrix (patchset #16 id:300001 of https://codereview.… Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 <html xmlns="http://www.w3.org/1999/xhtml"> 1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head> 2 <head>
3 <script src="../resources/js-test.js"></script> 3 <script src="../resources/js-test.js"></script>
4 </head> 4 </head>
5 <body> 5 <body>
6 <div id="description"></div> 6 <div id="description"></div>
7 <div id="console"></div> 7 <div id="console"></div>
8 8
9 <script> 9 <script>
10 10
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 shouldBe('sx.b', '0'); 248 shouldBe('sx.b', '0');
249 shouldBe('sx.c', '0'); 249 shouldBe('sx.c', '0');
250 shouldBe('sx.d', '1'); 250 shouldBe('sx.d', '1');
251 shouldBe('sx.e', '0'); 251 shouldBe('sx.e', '0');
252 shouldBe('sx.f', '0'); 252 shouldBe('sx.f', '0');
253 253
254 debug(""); 254 debug("");
255 debug("Test multiply with missing argument"); 255 debug("Test multiply with missing argument");
256 m = new WebKitCSSMatrix("matrix(1, 2, 3, 4, 5, 6)"); 256 m = new WebKitCSSMatrix("matrix(1, 2, 3, 4, 5, 6)");
257 m2 = m.multiply(); 257 m2 = m.multiply();
258 shouldBe('m2.a', '1'); 258 shouldBe('m2', 'null');
259 shouldBe('m2.b', '2');
260 shouldBe('m2.c', '3');
261 shouldBe('m2.d', '4');
262 shouldBe('m2.e', '5');
263 shouldBe('m2.f', '6');
264 259
265 debug(""); 260 debug("");
266 debug("Test inverse"); 261 debug("Test inverse");
267 m = new WebKitCSSMatrix("matrix(2, 0, 0, 2, 10, 20)"); 262 m = new WebKitCSSMatrix("matrix(2, 0, 0, 2, 10, 20)");
268 m2 = m.inverse(); 263 m2 = m.inverse();
269 264
270 shouldBe('parseFloat(m2.a)', '0.5'); 265 shouldBe('parseFloat(m2.a)', '0.5');
271 shouldBe('parseFloat(m2.b)', '0'); 266 shouldBe('parseFloat(m2.b)', '0');
272 shouldBe('parseFloat(m2.c)', '0'); 267 shouldBe('parseFloat(m2.c)', '0');
273 shouldBe('parseFloat(m2.d)', '0.5'); 268 shouldBe('parseFloat(m2.d)', '0.5');
274 shouldBe('parseFloat(m2.e)', '-5'); 269 shouldBe('parseFloat(m2.e)', '-5');
275 shouldBe('parseFloat(m2.f)', '-10'); 270 shouldBe('parseFloat(m2.f)', '-10');
276 271
277 debug(""); 272 debug("");
278 debug("Test immutability of inverse"); 273 debug("Test immutability of inverse");
279 shouldBe('parseFloat(m.a)', '2'); 274 shouldBe('parseFloat(m.a)', '2');
280 shouldBe('parseFloat(m.b)', '0'); 275 shouldBe('parseFloat(m.b)', '0');
281 shouldBe('parseFloat(m.c)', '0'); 276 shouldBe('parseFloat(m.c)', '0');
282 shouldBe('parseFloat(m.d)', '2'); 277 shouldBe('parseFloat(m.d)', '2');
283 shouldBe('parseFloat(m.e)', '10'); 278 shouldBe('parseFloat(m.e)', '10');
284 shouldBe('parseFloat(m.f)', '20'); 279 shouldBe('parseFloat(m.f)', '20');
285 280
286 debug(""); 281 debug("");
287 debug("Test not invertible matrix"); 282 debug("Test throwing exception from inverse");
288 m = new WebKitCSSMatrix("matrix(0, 0, 0, 0, 0, 0)"); // not invertible 283 m = new WebKitCSSMatrix("matrix(0, 0, 0, 0, 0, 0)"); // not invertible
289 m2 = m.inverse(); 284 shouldThrow('m.inverse()');
290
291 shouldBeNaN('m2.a');
292 shouldBeNaN('m2.b');
293 shouldBeNaN('m2.c');
294 shouldBeNaN('m2.d');
295 shouldBeNaN('m2.e');
296 shouldBeNaN('m2.f');
297
298 debug("");
299 debug("Test immutability of inverse");
300 shouldBe('m.a', '0');
301 shouldBe('m.b', '0');
302 shouldBe('m.c', '0');
303 shouldBe('m.d', '0');
304 shouldBe('m.e', '0');
305 shouldBe('m.f', '0');
306 285
307 debug(""); 286 debug("");
308 287
309 </script> 288 </script>
310 289
311 <script> 290 <script>
312 </script> 291 </script>
313 292
314 </body> 293 </body>
315 </html> 294 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698