| OLD | NEW |
| 1 <html xmlns="http://www.w3.org/1999/xhtml"> | 1 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 2 <head> | 2 <head> |
| 3 <script>window.enablePixelTesting = true;</script> | 3 <script>window.enablePixelTesting = true;</script> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <svg id="svg" xmlns="http://www.w3.org/2000/svg" width="250" height="250"> | 7 <svg id="svg" xmlns="http://www.w3.org/2000/svg" width="250" height="250"> |
| 8 <g transform="translate(10, 10)"> | 8 <g transform="translate(10, 10)"> |
| 9 <path id="path1" d="M 100 100 L 100 0 L 100 100" fill="green"/> | 9 <path id="path1" d="M 100 100 L 100 0 L 100 100" fill="green"/> |
| 10 <path transform="translate(110, 0)" id="path2" d="M 50 50 L 0 100 M 0 0"
fill="green"/> | 10 <path transform="translate(110, 0)" id="path2" d="M 50 50 L 0 100 M 0 0"
fill="green"/> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 debug(""); | 89 debug(""); |
| 90 debug("Check intermediate list state of path1"); | 90 debug("Check intermediate list state of path1"); |
| 91 shouldBe("path1.pathSegList.numberOfItems", "1"); | 91 shouldBe("path1.pathSegList.numberOfItems", "1"); |
| 92 shouldBeEqualToString("path1.pathSegList.getItem(0).toString()", "[object SV
GPathSegMovetoAbs]"); | 92 shouldBeEqualToString("path1.pathSegList.getItem(0).toString()", "[object SV
GPathSegMovetoAbs]"); |
| 93 shouldBe("path1.pathSegList.getItem(0).x", "50"); | 93 shouldBe("path1.pathSegList.getItem(0).x", "50"); |
| 94 shouldBe("path1.pathSegList.getItem(0).y", "50"); | 94 shouldBe("path1.pathSegList.getItem(0).y", "50"); |
| 95 | 95 |
| 96 debug(""); | 96 debug(""); |
| 97 debug("Check intermediate list state of path2"); | 97 debug("Check intermediate list state of path2"); |
| 98 shouldBe("path2.pathSegList.numberOfItems", "2"); | 98 shouldBe("path2.pathSegList.numberOfItems", "3"); |
| 99 shouldBeEqualToString("path2.pathSegList.getItem(0).toString()", "[object SV
GPathSegLinetoAbs]"); | 99 shouldBeEqualToString("path2.pathSegList.getItem(0).toString()", "[object SV
GPathSegMovetoAbs]"); |
| 100 shouldBe("path2.pathSegList.getItem(0).x", "0"); | 100 shouldBe("path2.pathSegList.getItem(0).x", "50"); |
| 101 shouldBe("path2.pathSegList.getItem(0).y", "100"); | 101 shouldBe("path2.pathSegList.getItem(0).y", "50"); |
| 102 shouldBeEqualToString("path2.pathSegList.getItem(1).toString()", "[object SV
GPathSegMovetoAbs]"); | 102 shouldBeEqualToString("path2.pathSegList.getItem(1).toString()", "[object SV
GPathSegLinetoAbs]"); |
| 103 shouldBe("path2.pathSegList.getItem(1).x", "0"); | 103 shouldBe("path2.pathSegList.getItem(1).x", "0"); |
| 104 shouldBe("path2.pathSegList.getItem(1).y", "0"); | 104 shouldBe("path2.pathSegList.getItem(1).y", "100"); |
| 105 shouldBeEqualToString("path2.pathSegList.getItem(2).toString()", "[object SV
GPathSegMovetoAbs]"); |
| 106 shouldBe("path2.pathSegList.getItem(2).x", "0"); |
| 107 shouldBe("path2.pathSegList.getItem(2).y", "0"); |
| 105 | 108 |
| 106 debug(""); | 109 debug(""); |
| 107 debug("Initialize path2 list with item0"); | 110 debug("Initialize path2 list with item0"); |
| 108 shouldBeEqualToString("path2.pathSegList.initialize(item0).toString()", "[ob
ject SVGPathSegMovetoAbs]"); | 111 shouldBeEqualToString("path2.pathSegList.initialize(item0).toString()", "[ob
ject SVGPathSegMovetoAbs]"); |
| 109 | 112 |
| 110 debug(""); | 113 debug(""); |
| 111 debug("Check final list state of path1"); | 114 debug("Check final list state of path1"); |
| 112 shouldBe("path1.pathSegList.numberOfItems", "1"); | 115 shouldBe("path1.pathSegList.numberOfItems", "1"); |
| 113 shouldBeEqualToString("path1.pathSegList.getItem(0).toString()", "[object SV
GPathSegMovetoAbs]"); | 116 shouldBeEqualToString("path1.pathSegList.getItem(0).toString()", "[object SV
GPathSegMovetoAbs]"); |
| 114 shouldBe("path1.pathSegList.getItem(0).x", "50"); | 117 shouldBe("path1.pathSegList.getItem(0).x", "50"); |
| 115 shouldBe("path1.pathSegList.getItem(0).y", "50"); | 118 shouldBe("path1.pathSegList.getItem(0).y", "50"); |
| 116 | 119 |
| 117 debug(""); | 120 debug(""); |
| 118 debug("Check final list state of path2"); | 121 debug("Check final list state of path2"); |
| 119 shouldBe("path2.pathSegList.numberOfItems", "1"); | 122 shouldBe("path2.pathSegList.numberOfItems", "1"); |
| 120 shouldBeEqualToString("path2.pathSegList.getItem(0).toString()", "[object SV
GPathSegMovetoAbs]"); | 123 shouldBeEqualToString("path2.pathSegList.getItem(0).toString()", "[object SV
GPathSegMovetoAbs]"); |
| 121 shouldBe("path2.pathSegList.getItem(0).x", "150"); | 124 shouldBe("path2.pathSegList.getItem(0).x", "150"); |
| 122 shouldBe("path2.pathSegList.getItem(0).y", "150"); | 125 shouldBe("path2.pathSegList.getItem(0).y", "150"); |
| 123 | 126 |
| 124 ]]> | 127 ]]> |
| 125 </script> | 128 </script> |
| 126 </body> | 129 </body> |
| 127 </html> | 130 </html> |
| OLD | NEW |