| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Geometry Interfaces: DOMPoint</title> | 4 <title>Geometry Interfaces: DOMPoint</title> |
| 5 <script src="../../resources/js-test.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
| 6 </head> | 6 </head> |
| 7 <body> | 7 <body> |
| 8 <script> | 8 <script> |
| 9 | 9 |
| 10 debug("# DOMPoint(2, 3)"); | 10 debug("# DOMPoint(2, 3)"); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 debug("# DOMPoint(8, 2, 1, 6)"); | 26 debug("# DOMPoint(8, 2, 1, 6)"); |
| 27 point = new DOMPoint(5, 7, 9); | 27 point = new DOMPoint(5, 7, 9); |
| 28 point = new DOMPoint(8, 2, 1, 6); | 28 point = new DOMPoint(8, 2, 1, 6); |
| 29 shouldBe("point.x", "8"); | 29 shouldBe("point.x", "8"); |
| 30 shouldBe("point.y", "2"); | 30 shouldBe("point.y", "2"); |
| 31 shouldBe("point.z", "1"); | 31 shouldBe("point.z", "1"); |
| 32 shouldBe("point.w", "6"); | 32 shouldBe("point.w", "6"); |
| 33 debug(""); | 33 debug(""); |
| 34 | 34 |
| 35 debug("# DOMPoint({ x : 2 })"); | |
| 36 point = new DOMPoint({ x : 2 }); | |
| 37 shouldBe("point.x", "2"); | |
| 38 shouldBe("point.y", "0"); | |
| 39 shouldBe("point.z", "0"); | |
| 40 shouldBe("point.w", "1"); | |
| 41 debug(""); | |
| 42 | |
| 43 debug("# DOMPoint({ y : 2 })"); | |
| 44 point = new DOMPoint({ y : 2 }); | |
| 45 shouldBe("point.x", "0"); | |
| 46 shouldBe("point.y", "2"); | |
| 47 shouldBe("point.z", "0"); | |
| 48 shouldBe("point.w", "1"); | |
| 49 debug(""); | |
| 50 | |
| 51 debug("# DOMPoint({ z : 2 })"); | |
| 52 point = new DOMPoint({ z : 2 }); | |
| 53 shouldBe("point.x", "0"); | |
| 54 shouldBe("point.y", "0"); | |
| 55 shouldBe("point.z", "2"); | |
| 56 shouldBe("point.w", "1"); | |
| 57 debug(""); | |
| 58 | |
| 59 debug("# DOMPoint({ w : 2 })"); | |
| 60 point = new DOMPoint({ w : 2 }); | |
| 61 shouldBe("point.x", "0"); | |
| 62 shouldBe("point.y", "0"); | |
| 63 shouldBe("point.z", "0"); | |
| 64 shouldBe("point.w", "2"); | |
| 65 debug(""); | |
| 66 | |
| 67 debug("# DOMPoint({ x : 2, y : 3, z : 4, w : 5 })"); | |
| 68 point = new DOMPoint({ x : 2, y : 3, z : 4, w : 5 }); | |
| 69 shouldBe("point.x", "2"); | |
| 70 shouldBe("point.y", "3"); | |
| 71 shouldBe("point.z", "4"); | |
| 72 shouldBe("point.w", "5"); | |
| 73 debug(""); | |
| 74 | |
| 75 debug("# DOMPoint()"); | 35 debug("# DOMPoint()"); |
| 76 point = new DOMPoint(); | 36 point = new DOMPoint(); |
| 77 shouldBe("point.x", "0"); | 37 shouldBe("point.x", "0"); |
| 78 shouldBe("point.y", "0"); | 38 shouldBe("point.y", "0"); |
| 79 shouldBe("point.z", "0"); | 39 shouldBe("point.z", "0"); |
| 80 shouldBe("point.w", "1"); | 40 shouldBe("point.w", "1"); |
| 81 debug(""); | 41 debug(""); |
| 82 | 42 |
| 83 debug("# DOMPoint setter"); | 43 debug("# DOMPoint setter"); |
| 84 point.x = 10; | 44 point.x = 10; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 105 point.y = 100; | 65 point.y = 100; |
| 106 shouldBe("point.y", "20"); | 66 shouldBe("point.y", "20"); |
| 107 point.z = 100; | 67 point.z = 100; |
| 108 shouldBe("point.z", "30"); | 68 shouldBe("point.z", "30"); |
| 109 point.w = 100; | 69 point.w = 100; |
| 110 shouldBe("point.w", "40"); | 70 shouldBe("point.w", "40"); |
| 111 | 71 |
| 112 </script> | 72 </script> |
| 113 </body> | 73 </body> |
| 114 </html> | 74 </html> |
| OLD | NEW |