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

Side by Side Diff: LayoutTests/svg/dom/SVGPathSegList-insertItemBefore.xhtml

Issue 1177303004: Updated SVGListPropertyHelper as per SVG2 Spec (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: small nits Created 5 years, 6 months 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
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 0 0 L 100 0 L 0 100 L 100 100" fill="green"/> 9 <path id="path1" d="M 0 0 L 100 0 L 0 100 L 100 100" fill="green"/>
10 </g> 10 </g>
(...skipping 23 matching lines...) Expand all
34 shouldBeEqualToString("path1.pathSegList.getItem(3).toString()", "[object SV GPathSegLinetoAbs]"); 34 shouldBeEqualToString("path1.pathSegList.getItem(3).toString()", "[object SV GPathSegLinetoAbs]");
35 shouldBe("path1.pathSegList.getItem(3).x", "100"); 35 shouldBe("path1.pathSegList.getItem(3).x", "100");
36 shouldBe("path1.pathSegList.getItem(3).y", "100"); 36 shouldBe("path1.pathSegList.getItem(3).y", "100");
37 37
38 debug(""); 38 debug("");
39 debug("Insert fourth item at position three using insertItemBefore()"); 39 debug("Insert fourth item at position three using insertItemBefore()");
40 shouldBeEqualToString("path1.pathSegList.insertItemBefore(path1.pathSegList. getItem(3), 2).toString()", "[object SVGPathSegLinetoAbs]"); 40 shouldBeEqualToString("path1.pathSegList.insertItemBefore(path1.pathSegList. getItem(3), 2).toString()", "[object SVGPathSegLinetoAbs]");
41 41
42 debug(""); 42 debug("");
43 debug("Check final 'pathSegList' value of path1"); 43 debug("Check final 'pathSegList' value of path1");
44 shouldBe("path1.pathSegList.numberOfItems", "4"); 44 shouldBe("path1.pathSegList.numberOfItems", "5");
45 shouldBeEqualToString("path1.pathSegList.getItem(0).toString()", "[object SV GPathSegMovetoAbs]"); 45 shouldBeEqualToString("path1.pathSegList.getItem(0).toString()", "[object SV GPathSegMovetoAbs]");
46 shouldBe("path1.pathSegList.getItem(0).x", "0"); 46 shouldBe("path1.pathSegList.getItem(0).x", "0");
47 shouldBe("path1.pathSegList.getItem(0).y", "0"); 47 shouldBe("path1.pathSegList.getItem(0).y", "0");
48 shouldBeEqualToString("path1.pathSegList.getItem(1).toString()", "[object SV GPathSegLinetoAbs]"); 48 shouldBeEqualToString("path1.pathSegList.getItem(1).toString()", "[object SV GPathSegLinetoAbs]");
49 shouldBe("path1.pathSegList.getItem(1).x", "100"); 49 shouldBe("path1.pathSegList.getItem(1).x", "100");
50 shouldBe("path1.pathSegList.getItem(1).y", "0"); 50 shouldBe("path1.pathSegList.getItem(1).y", "0");
51 shouldBeEqualToString("path1.pathSegList.getItem(2).toString()", "[object SV GPathSegLinetoAbs]"); 51 shouldBeEqualToString("path1.pathSegList.getItem(2).toString()", "[object SV GPathSegLinetoAbs]");
52 shouldBe("path1.pathSegList.getItem(2).x", "100"); 52 shouldBe("path1.pathSegList.getItem(2).x", "100");
53 shouldBe("path1.pathSegList.getItem(2).y", "100"); 53 shouldBe("path1.pathSegList.getItem(2).y", "100");
54 shouldBeEqualToString("path1.pathSegList.getItem(3).toString()", "[object SV GPathSegLinetoAbs]"); 54 shouldBeEqualToString("path1.pathSegList.getItem(3).toString()", "[object SV GPathSegLinetoAbs]");
55 shouldBe("path1.pathSegList.getItem(3).x", "0"); 55 shouldBe("path1.pathSegList.getItem(3).x", "0");
56 shouldBe("path1.pathSegList.getItem(3).y", "100"); 56 shouldBe("path1.pathSegList.getItem(3).y", "100");
57 shouldBeEqualToString("path1.pathSegList.getItem(4).toString()", "[object SV GPathSegLinetoAbs]");
58 shouldBe("path1.pathSegList.getItem(4).x", "100");
59 shouldBe("path1.pathSegList.getItem(4).y", "100");
57 60
58 ]]> 61 ]]>
59 </script> 62 </script>
60 </body> 63 </body>
61 </html> 64 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698