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

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: fixed presubmit error 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 20 matching lines...) Expand all
31 shouldBeEqualToString("path1.pathSegList.getItem(2).toString()", "[object SV GPathSegLinetoAbs]"); 31 shouldBeEqualToString("path1.pathSegList.getItem(2).toString()", "[object SV GPathSegLinetoAbs]");
32 shouldBe("path1.pathSegList.getItem(2).x", "0"); 32 shouldBe("path1.pathSegList.getItem(2).x", "0");
33 shouldBe("path1.pathSegList.getItem(2).y", "100"); 33 shouldBe("path1.pathSegList.getItem(2).y", "100");
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 shouldBe("path1.pathSegList.numberOfItems", "5");
42 shouldBeEqualToString("path1.pathSegList.getItem(0).toString()", "[object SV GPathSegMovetoAbs]");
43 shouldBe("path1.pathSegList.getItem(0).x", "0");
44 shouldBe("path1.pathSegList.getItem(0).y", "0");
45 shouldBeEqualToString("path1.pathSegList.getItem(1).toString()", "[object SV GPathSegLinetoAbs]");
46 shouldBe("path1.pathSegList.getItem(1).x", "100");
47 shouldBe("path1.pathSegList.getItem(1).y", "0");
48 shouldBeEqualToString("path1.pathSegList.getItem(2).toString()", "[object SV GPathSegLinetoAbs]");
49 shouldBe("path1.pathSegList.getItem(2).x", "100");
50 shouldBe("path1.pathSegList.getItem(2).y", "100");
51 shouldBeEqualToString("path1.pathSegList.getItem(3).toString()", "[object SV GPathSegLinetoAbs]");
52 shouldBe("path1.pathSegList.getItem(3).x", "0");
53 shouldBe("path1.pathSegList.getItem(3).y", "100");
54 shouldBeEqualToString("path1.pathSegList.getItem(4).toString()", "[object SV GPathSegLinetoAbs]");
55 shouldBe("path1.pathSegList.getItem(4).x", "100");
56 shouldBe("path1.pathSegList.getItem(4).y", "100");
57
58 debug("");
59 debug("Change last item of path1 list");
60 shouldBe("path1.pathSegList.getItem(4).x = 0", "0");
41 61
42 debug(""); 62 debug("");
43 debug("Check final 'pathSegList' value of path1"); 63 debug("Check final 'pathSegList' value of path1");
44 shouldBe("path1.pathSegList.numberOfItems", "4"); 64 shouldBe("path1.pathSegList.numberOfItems", "5");
45 shouldBeEqualToString("path1.pathSegList.getItem(0).toString()", "[object SV GPathSegMovetoAbs]"); 65 shouldBeEqualToString("path1.pathSegList.getItem(0).toString()", "[object SV GPathSegMovetoAbs]");
46 shouldBe("path1.pathSegList.getItem(0).x", "0"); 66 shouldBe("path1.pathSegList.getItem(0).x", "0");
47 shouldBe("path1.pathSegList.getItem(0).y", "0"); 67 shouldBe("path1.pathSegList.getItem(0).y", "0");
48 shouldBeEqualToString("path1.pathSegList.getItem(1).toString()", "[object SV GPathSegLinetoAbs]"); 68 shouldBeEqualToString("path1.pathSegList.getItem(1).toString()", "[object SV GPathSegLinetoAbs]");
49 shouldBe("path1.pathSegList.getItem(1).x", "100"); 69 shouldBe("path1.pathSegList.getItem(1).x", "100");
50 shouldBe("path1.pathSegList.getItem(1).y", "0"); 70 shouldBe("path1.pathSegList.getItem(1).y", "0");
51 shouldBeEqualToString("path1.pathSegList.getItem(2).toString()", "[object SV GPathSegLinetoAbs]"); 71 shouldBeEqualToString("path1.pathSegList.getItem(2).toString()", "[object SV GPathSegLinetoAbs]");
52 shouldBe("path1.pathSegList.getItem(2).x", "100"); 72 shouldBe("path1.pathSegList.getItem(2).x", "100");
53 shouldBe("path1.pathSegList.getItem(2).y", "100"); 73 shouldBe("path1.pathSegList.getItem(2).y", "100");
54 shouldBeEqualToString("path1.pathSegList.getItem(3).toString()", "[object SV GPathSegLinetoAbs]"); 74 shouldBeEqualToString("path1.pathSegList.getItem(3).toString()", "[object SV GPathSegLinetoAbs]");
55 shouldBe("path1.pathSegList.getItem(3).x", "0"); 75 shouldBe("path1.pathSegList.getItem(3).x", "0");
56 shouldBe("path1.pathSegList.getItem(3).y", "100"); 76 shouldBe("path1.pathSegList.getItem(3).y", "100");
77 shouldBeEqualToString("path1.pathSegList.getItem(4).toString()", "[object SV GPathSegLinetoAbs]");
78 shouldBe("path1.pathSegList.getItem(4).x", "0");
79 shouldBe("path1.pathSegList.getItem(4).y", "100");
57 80
58 ]]> 81 ]]>
59 </script> 82 </script>
60 </body> 83 </body>
61 </html> 84 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698