| OLD | NEW |
| 1 This is a test of the SVGPathSegList::appendItem() API. | 1 This is a test of the SVGPathSegList::appendItem() API. |
| 2 | 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 Check initial 'pathSegList' value of path1 | 7 Check initial 'pathSegList' value of path1 |
| 8 PASS path1.pathSegList.numberOfItems is 3 | 8 PASS path1.pathSegList.numberOfItems is 3 |
| 9 PASS path1.pathSegList.getItem(0).toString() is "[object SVGPathSegMovetoAbs]" | 9 PASS path1.pathSegList.getItem(0).toString() is "[object SVGPathSegMovetoAbs]" |
| 10 PASS path1.pathSegList.getItem(0).x is 0 | 10 PASS path1.pathSegList.getItem(0).x is 0 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 PASS path2.pathSegList.getItem(2).toString() is "[object SVGPathSegLinetoHorizon
talRel]" | 27 PASS path2.pathSegList.getItem(2).toString() is "[object SVGPathSegLinetoHorizon
talRel]" |
| 28 PASS path2.pathSegList.getItem(2).x is 100 | 28 PASS path2.pathSegList.getItem(2).x is 100 |
| 29 PASS path2.pathSegList.getItem(3).toString() is "[object SVGPathSegLinetoHorizon
talRel]" | 29 PASS path2.pathSegList.getItem(3).toString() is "[object SVGPathSegLinetoHorizon
talRel]" |
| 30 PASS path2.pathSegList.getItem(3).x is 100 | 30 PASS path2.pathSegList.getItem(3).x is 100 |
| 31 PASS path2.pathSegList.getItem(4).toString() is "[object SVGPathSegLinetoVertica
lRel]" | 31 PASS path2.pathSegList.getItem(4).toString() is "[object SVGPathSegLinetoVertica
lRel]" |
| 32 PASS path2.pathSegList.getItem(4).y is 100 | 32 PASS path2.pathSegList.getItem(4).y is 100 |
| 33 | 33 |
| 34 Negate x value of fourth segment in path2 | 34 Negate x value of fourth segment in path2 |
| 35 PASS path2.pathSegList.getItem(3).x = -path2.pathSegList.getItem(3).x is -100 | 35 PASS path2.pathSegList.getItem(3).x = -path2.pathSegList.getItem(3).x is -100 |
| 36 | 36 |
| 37 Swap segment four and five of path2 - now should look like a rectangle | 37 Append second item from path1 to path2 list |
| 38 PASS path2.pathSegList.appendItem(path2.pathSegList.getItem(3)).toString() is "[
object SVGPathSegLinetoHorizontalRel]" | 38 PASS path2.pathSegList.appendItem(path2.pathSegList.getItem(3)).toString() is "[
object SVGPathSegLinetoHorizontalRel]" |
| 39 PASS path2.pathSegList.numberOfItems is 6 |
| 40 PASS path2.pathSegList.getItem(0).toString() is "[object SVGPathSegMovetoAbs]" |
| 41 PASS path2.pathSegList.getItem(0).x is 0 |
| 42 PASS path2.pathSegList.getItem(0).y is 0 |
| 43 PASS path2.pathSegList.getItem(1).toString() is "[object SVGPathSegLinetoAbs]" |
| 44 PASS path2.pathSegList.getItem(1).x is 50 |
| 45 PASS path2.pathSegList.getItem(1).y is 100 |
| 46 PASS path2.pathSegList.getItem(2).toString() is "[object SVGPathSegLinetoHorizon
talRel]" |
| 47 PASS path2.pathSegList.getItem(2).x is 100 |
| 48 PASS path2.pathSegList.getItem(3).toString() is "[object SVGPathSegLinetoHorizon
talRel]" |
| 49 PASS path2.pathSegList.getItem(3).x is -100 |
| 50 PASS path2.pathSegList.getItem(4).toString() is "[object SVGPathSegLinetoVertica
lRel]" |
| 51 PASS path2.pathSegList.getItem(4).y is 100 |
| 52 PASS path2.pathSegList.getItem(5).toString() is "[object SVGPathSegLinetoHorizon
talRel]" |
| 53 PASS path2.pathSegList.getItem(5).x is -100 |
| 39 | 54 |
| 40 Append second item from path2 to path1 list | 55 Append second item from path2 to path1 list |
| 41 PASS path1.pathSegList.appendItem(path2.pathSegList.getItem(1)).toString() is "[
object SVGPathSegLinetoAbs]" | 56 PASS path1.pathSegList.appendItem(path2.pathSegList.getItem(1)).toString() is "[
object SVGPathSegLinetoAbs]" |
| 42 | 57 |
| 43 Change last item of path1 list, that came from path2 list, assure it's updating
path1 | 58 Change last item of path1 list, that came from path2 list, assure it's updating
path1 |
| 44 PASS path1.pathSegList.getItem(3).x -= 50 is 0 | 59 PASS path1.pathSegList.getItem(3).x -= 50 is 0 |
| 45 | 60 |
| 61 Reset points attribute to M 0 0 L 100 0 v 100 |
| 62 PASS path2.setAttribute('d', 'M 0 0 L 100 0 v 100') is undefined. |
| 63 |
| 64 Append fourth item from path1 to path2 list - now should look like a rectangle |
| 65 PASS path2.pathSegList.appendItem(path1.pathSegList.getItem(3)).toString() is "[
object SVGPathSegLinetoAbs]" |
| 66 |
| 46 Check final 'pathSegList' value of path1 | 67 Check final 'pathSegList' value of path1 |
| 47 PASS path1.pathSegList.numberOfItems is 4 | 68 PASS path1.pathSegList.numberOfItems is 4 |
| 48 PASS path1.pathSegList.getItem(0).toString() is "[object SVGPathSegMovetoAbs]" | 69 PASS path1.pathSegList.getItem(0).toString() is "[object SVGPathSegMovetoAbs]" |
| 49 PASS path1.pathSegList.getItem(0).x is 0 | 70 PASS path1.pathSegList.getItem(0).x is 0 |
| 50 PASS path1.pathSegList.getItem(0).y is 0 | 71 PASS path1.pathSegList.getItem(0).y is 0 |
| 51 PASS path1.pathSegList.getItem(1).toString() is "[object SVGPathSegLinetoAbs]" | 72 PASS path1.pathSegList.getItem(1).toString() is "[object SVGPathSegLinetoAbs]" |
| 52 PASS path1.pathSegList.getItem(1).x is 100 | 73 PASS path1.pathSegList.getItem(1).x is 100 |
| 53 PASS path1.pathSegList.getItem(1).y is 0 | 74 PASS path1.pathSegList.getItem(1).y is 0 |
| 54 PASS path1.pathSegList.getItem(2).toString() is "[object SVGPathSegLinetoAbs]" | 75 PASS path1.pathSegList.getItem(2).toString() is "[object SVGPathSegLinetoAbs]" |
| 55 PASS path1.pathSegList.getItem(2).x is 100 | 76 PASS path1.pathSegList.getItem(2).x is 100 |
| 56 PASS path1.pathSegList.getItem(2).y is 100 | 77 PASS path1.pathSegList.getItem(2).y is 100 |
| 57 PASS path1.pathSegList.getItem(3).toString() is "[object SVGPathSegLinetoAbs]" | 78 PASS path1.pathSegList.getItem(3).toString() is "[object SVGPathSegLinetoAbs]" |
| 58 PASS path1.pathSegList.getItem(3).x is 0 | 79 PASS path1.pathSegList.getItem(3).x is 0 |
| 59 PASS path1.pathSegList.getItem(3).y is 100 | 80 PASS path1.pathSegList.getItem(3).y is 100 |
| 60 | 81 |
| 61 Check final 'pathSegList' value of path2 | 82 Check final 'pathSegList' value of path2 |
| 62 PASS path2.pathSegList.numberOfItems is 4 | 83 PASS path2.pathSegList.numberOfItems is 4 |
| 63 PASS path2.pathSegList.getItem(0).toString() is "[object SVGPathSegMovetoAbs]" | 84 PASS path2.pathSegList.getItem(0).toString() is "[object SVGPathSegMovetoAbs]" |
| 64 PASS path2.pathSegList.getItem(0).x is 0 | 85 PASS path2.pathSegList.getItem(0).x is 0 |
| 65 PASS path2.pathSegList.getItem(0).y is 0 | 86 PASS path2.pathSegList.getItem(0).y is 0 |
| 66 PASS path2.pathSegList.getItem(1).toString() is "[object SVGPathSegLinetoHorizon
talRel]" | 87 PASS path2.pathSegList.getItem(1).toString() is "[object SVGPathSegLinetoAbs]" |
| 67 PASS path2.pathSegList.getItem(1).x is 100 | 88 PASS path2.pathSegList.getItem(1).x is 100 |
| 89 PASS path1.pathSegList.getItem(1).y is 0 |
| 68 PASS path2.pathSegList.getItem(2).toString() is "[object SVGPathSegLinetoVertica
lRel]" | 90 PASS path2.pathSegList.getItem(2).toString() is "[object SVGPathSegLinetoVertica
lRel]" |
| 69 PASS path2.pathSegList.getItem(2).y is 100 | 91 PASS path2.pathSegList.getItem(2).y is 100 |
| 70 PASS path2.pathSegList.getItem(3).toString() is "[object SVGPathSegLinetoHorizon
talRel]" | 92 PASS path2.pathSegList.getItem(3).toString() is "[object SVGPathSegLinetoAbs]" |
| 71 PASS path2.pathSegList.getItem(3).x is -100 | 93 PASS path2.pathSegList.getItem(3).x is 0 |
| 94 PASS path1.pathSegList.getItem(3).y is 100 |
| 72 PASS successfullyParsed is true | 95 PASS successfullyParsed is true |
| 73 | 96 |
| 74 TEST COMPLETE | 97 TEST COMPLETE |
| 75 | 98 |
| OLD | NEW |