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

Unified Diff: LayoutTests/svg/dom/SVGLengthList-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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/svg/dom/SVGLengthList-insertItemBefore.xhtml
diff --git a/LayoutTests/svg/dom/SVGLengthList-insertItemBefore.xhtml b/LayoutTests/svg/dom/SVGLengthList-insertItemBefore.xhtml
index 8546ce4e1c6056fc8844f689448270663fae0e89..c341555a3c4f93e4be030c5d346c6d3ba219eded 100644
--- a/LayoutTests/svg/dom/SVGLengthList-insertItemBefore.xhtml
+++ b/LayoutTests/svg/dom/SVGLengthList-insertItemBefore.xhtml
@@ -96,31 +96,34 @@
shouldBe("text1.x.baseVal.getItem(5).value", "50");
shouldThrow("text1.x.baseVal.getItem(6)");
- // Spec: If newItem is already in a list, it is removed from its previous list before it is inserted into this list.
- // Spec: If the item is already in this list, note that the index of the item to insert before is before the removal of the item.
+ // Spec: If newItem is already in a list, then a new object is created with the same values as newItem and this item is inserted into the list.
+ // Otherwise, newItem itself is inserted into the list..
debug("");
- debug("Insert item 'newLength3' at position=1, between '100' and '500', remove it from the old position=2 afterwards.");
+ debug("Insert item 'newLength3' at position=1, between '100' and '500', should not remove it from the old position=2 afterwards.");
shouldBe("text1.x.baseVal.insertItemBefore(newLength3, 1)", "newLength3");
- shouldBe("text1.x.baseVal.numberOfItems", "6");
+ shouldBe("text1.x.baseVal.numberOfItems", "7");
shouldBe("text1.x.baseVal.getItem(0).value", "100");
shouldBe("text1.x.baseVal.getItem(1).value", "150");
shouldBe("text1.x.baseVal.getItem(2).value", "500");
- shouldBe("text1.x.baseVal.getItem(3).value", "1000");
- shouldBe("text1.x.baseVal.getItem(4).value", "1500");
- shouldBe("text1.x.baseVal.getItem(5).value", "50");
- shouldThrow("text1.x.baseVal.getItem(6)");
+ shouldBe("text1.x.baseVal.getItem(3).value", "150");
+ shouldBe("text1.x.baseVal.getItem(4).value", "1000");
+ shouldBe("text1.x.baseVal.getItem(5).value", "1500");
+ shouldBe("text1.x.baseVal.getItem(6).value", "50");
+ shouldThrow("text1.x.baseVal.getItem(7)");
debug("");
- debug("Insert item 'newLength3' at position=0, before '100', remove it from the old position=5 afterwards.");
+ debug("Insert item 'newLength1' at position=0, before '100', should not remove it from the old position=6 afterwards.");
shouldBe("text1.x.baseVal.insertItemBefore(newLength1, 0)", "newLength1");
- shouldBe("text1.x.baseVal.numberOfItems", "6");
+ shouldBe("text1.x.baseVal.numberOfItems", "8");
shouldBe("text1.x.baseVal.getItem(0).value", "50");
shouldBe("text1.x.baseVal.getItem(1).value", "100");
shouldBe("text1.x.baseVal.getItem(2).value", "150");
shouldBe("text1.x.baseVal.getItem(3).value", "500");
- shouldBe("text1.x.baseVal.getItem(4).value", "1000");
- shouldBe("text1.x.baseVal.getItem(5).value", "1500");
- shouldThrow("text1.x.baseVal.getItem(6)");
+ shouldBe("text1.x.baseVal.getItem(4).value", "150");
+ shouldBe("text1.x.baseVal.getItem(5).value", "1000");
+ shouldBe("text1.x.baseVal.getItem(6).value", "1500");
+ shouldBe("text1.x.baseVal.getItem(7).value", "50");
+ shouldThrow("text1.x.baseVal.getItem(8)");
debug("");
debug("The test passes if you only see 'PASS' messages, and both text elements on top look the same");

Powered by Google App Engine
This is Rietveld 408576698