| OLD | NEW |
| 1 description("This tests the SVG path parser by parsing and then re-serializing v
arious paths."); | 1 description("This tests the SVG path parser by parsing and then re-serializing v
arious paths."); |
| 2 | 2 |
| 3 var pathElement = document.createElementNS("http://www.w3.org/2000/svg", "path")
; | 3 var pathElement = document.createElementNS("http://www.w3.org/2000/svg", "path")
; |
| 4 | 4 |
| 5 var pathProperties = { | 5 var pathProperties = { |
| 6 "M": [ "x", "y" ], | 6 "M": [ "x", "y" ], |
| 7 "m": [ "x", "y" ], | 7 "m": [ "x", "y" ], |
| 8 "L": [ "x", "y" ], | 8 "L": [ "x", "y" ], |
| 9 "l": [ "x", "y" ], | 9 "l": [ "x", "y" ], |
| 10 "H": [ "x" ], | 10 "H": [ "x" ], |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 shouldBe("parsePath('xM1,2')", "''"); | 119 shouldBe("parsePath('xM1,2')", "''"); |
| 120 shouldBe("parsePath('M1,2 ')", "'M1,2'"); | 120 shouldBe("parsePath('M1,2 ')", "'M1,2'"); |
| 121 shouldBe("parsePath('M1,2\\t')", "'M1,2'"); | 121 shouldBe("parsePath('M1,2\\t')", "'M1,2'"); |
| 122 shouldBe("parsePath('M1,2\\n')", "'M1,2'"); | 122 shouldBe("parsePath('M1,2\\n')", "'M1,2'"); |
| 123 shouldBe("parsePath('M1,2\\r')", "'M1,2'"); | 123 shouldBe("parsePath('M1,2\\r')", "'M1,2'"); |
| 124 shouldBe("parsePath('M1,2\\v')", "'M1,2'"); | 124 shouldBe("parsePath('M1,2\\v')", "'M1,2'"); |
| 125 shouldBe("parsePath('M1,2x')", "'M1,2'"); | 125 shouldBe("parsePath('M1,2x')", "'M1,2'"); |
| 126 shouldBe("parsePath('M1,2 L40,0#90')", "'M1,2 L40,0'"); | 126 shouldBe("parsePath('M1,2 L40,0#90')", "'M1,2 L40,0'"); |
| 127 | 127 |
| 128 shouldBe("parsePath('')", "''"); | 128 shouldBe("parsePath('')", "''"); |
| 129 shouldBe("parsePath(' ')", "''"); |
| 129 shouldBe("parsePath('x')", "''"); | 130 shouldBe("parsePath('x')", "''"); |
| 130 shouldBe("parsePath('L1,2')", "''"); | 131 shouldBe("parsePath('L1,2')", "''"); |
| 131 shouldBe("parsePath('M.1 .2 L.3 .4 .5 .6')", "'M0.1,0.2 L0.3,0.4 L0.5,0.6'"); | 132 shouldBe("parsePath('M.1 .2 L.3 .4 .5 .6')", "'M0.1,0.2 L0.3,0.4 L0.5,0.6'"); |
| 132 | 133 |
| 133 successfullyParsed = true; | 134 successfullyParsed = true; |
| OLD | NEW |