| This is a test of the SVGPathSegList::replaceItem() API. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| |
| Check initial 'pathSegList' value of path1 |
| PASS path1.pathSegList.numberOfItems is 6 |
| PASS path1.pathSegList.getItem(0).toString() is "[object SVGPathSegMovetoAbs]" |
| PASS path1.pathSegList.getItem(0).x is 0 |
| PASS path1.pathSegList.getItem(0).y is 0 |
| PASS path1.pathSegList.getItem(1).toString() is "[object SVGPathSegLinetoAbs]" |
| PASS path1.pathSegList.getItem(1).x is 100 |
| PASS path1.pathSegList.getItem(1).y is 100 |
| PASS path1.pathSegList.getItem(2).toString() is "[object SVGPathSegLinetoAbs]" |
| PASS path1.pathSegList.getItem(2).x is 100 |
| PASS path1.pathSegList.getItem(2).y is 0 |
| PASS path1.pathSegList.getItem(3).toString() is "[object SVGPathSegLinetoAbs]" |
| PASS path1.pathSegList.getItem(3).x is 100 |
| PASS path1.pathSegList.getItem(3).y is 100 |
| PASS path1.pathSegList.getItem(4).toString() is "[object SVGPathSegLinetoVerticalRel]" |
| PASS path1.pathSegList.getItem(4).y is 100 |
| PASS path1.pathSegList.getItem(5).toString() is "[object SVGPathSegLinetoAbs]" |
| PASS path1.pathSegList.getItem(5).x is 0 |
| PASS path1.pathSegList.getItem(5).y is 100 |
| |
| Check initial 'pathSegList' value of path2 |
| PASS path2.pathSegList.numberOfItems is 4 |
| PASS path2.pathSegList.getItem(0).toString() is "[object SVGPathSegMovetoAbs]" |
| PASS path2.pathSegList.getItem(0).x is 0 |
| PASS path2.pathSegList.getItem(0).y is 0 |
| PASS path2.pathSegList.getItem(1).toString() is "[object SVGPathSegLinetoHorizontalRel]" |
| PASS path2.pathSegList.getItem(1).x is 100 |
| PASS path2.pathSegList.getItem(2).toString() is "[object SVGPathSegLinetoAbs]" |
| PASS path2.pathSegList.getItem(2).x is 200 |
| PASS path2.pathSegList.getItem(2).y is 100 |
| PASS path2.pathSegList.getItem(3).toString() is "[object SVGPathSegLinetoHorizontalRel]" |
| PASS path2.pathSegList.getItem(3).x is -100 |
| |
| Replace second item with third item of path1 |
| PASS path1.pathSegList.replaceItem(path1.pathSegList.getItem(2), 1).toString() is "[object SVGPathSegLinetoAbs]" |
| |
| Replace third item of path2 with fourth item of path1 |
| PASS path2.pathSegList.replaceItem(path1.pathSegList.getItem(3), 2).toString() is "[object SVGPathSegLinetoVerticalRel]" |
| |
| Check final 'pathSegList' value of path1 |
| PASS path1.pathSegList.numberOfItems is 4 |
| PASS path1.pathSegList.getItem(0).toString() is "[object SVGPathSegMovetoAbs]" |
| PASS path1.pathSegList.getItem(0).x is 0 |
| PASS path1.pathSegList.getItem(0).y is 0 |
| PASS path1.pathSegList.getItem(1).toString() is "[object SVGPathSegLinetoAbs]" |
| PASS path1.pathSegList.getItem(1).x is 100 |
| PASS path1.pathSegList.getItem(1).y is 0 |
| PASS path1.pathSegList.getItem(2).toString() is "[object SVGPathSegLinetoAbs]" |
| PASS path1.pathSegList.getItem(2).x is 100 |
| PASS path1.pathSegList.getItem(2).y is 100 |
| PASS path1.pathSegList.getItem(3).toString() is "[object SVGPathSegLinetoAbs]" |
| PASS path1.pathSegList.getItem(3).x is 0 |
| PASS path1.pathSegList.getItem(3).y is 100 |
| |
| Check final 'pathSegList' value of path2 |
| PASS path2.pathSegList.numberOfItems is 4 |
| PASS path2.pathSegList.getItem(0).toString() is "[object SVGPathSegMovetoAbs]" |
| PASS path2.pathSegList.getItem(0).x is 0 |
| PASS path2.pathSegList.getItem(0).y is 0 |
| PASS path2.pathSegList.getItem(1).toString() is "[object SVGPathSegLinetoHorizontalRel]" |
| PASS path2.pathSegList.getItem(1).x is 100 |
| PASS path2.pathSegList.getItem(2).toString() is "[object SVGPathSegLinetoVerticalRel]" |
| PASS path2.pathSegList.getItem(2).y is 100 |
| PASS path2.pathSegList.getItem(3).toString() is "[object SVGPathSegLinetoHorizontalRel]" |
| PASS path2.pathSegList.getItem(3).x is -100 |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |