Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/svglist-insertItemBefore-appends.html

Issue 1416273002: Remove SVGPathElement.pathSegList and related interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="console"></div>
9 <script>
10 description("Tests that insertItemBefore correctly appends if its index is o ut of bounds.");
11 var path = document.createElementNS("http://www.w3.org/2000/svg","path");
12 var seg00 = path.createSVGPathSegMovetoAbs(0,0);
13 var seg01 = path.createSVGPathSegMovetoAbs(0,1);
14 var seg11 = path.createSVGPathSegMovetoAbs(1,1);
15 var seg10 = path.createSVGPathSegMovetoAbs(1,0);
16 var svgList = path.pathSegList;
17 shouldBe("svgList.numberOfItems", "0");
18 svgList.appendItem(seg01);
19 shouldBe("svgList.numberOfItems", "1");
20 shouldBe("svgList.getItem(0)", "seg01");
21 svgList.appendItem(seg11);
22 shouldBe("svgList.numberOfItems", "2");
23 shouldBe("svgList.getItem(0)", "seg01");
24 shouldBe("svgList.getItem(1)", "seg11");
25 svgList.insertItemBefore(seg00, 0);
26 shouldBe("svgList.numberOfItems", "3");
27 shouldBe("svgList.getItem(0)", "seg00");
28 shouldBe("svgList.getItem(1)", "seg01");
29 shouldBe("svgList.getItem(2)", "seg11");
30 svgList.insertItemBefore(seg10, 42);
31 shouldBe("svgList.numberOfItems", "4");
32 shouldBe("svgList.getItem(0)", "seg00");
33 shouldBe("svgList.getItem(1)", "seg01");
34 shouldBe("svgList.getItem(2)", "seg11");
35 shouldBe("svgList.getItem(3)", "seg10");
36 </script>
37 </body>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698