blob: dd2a2ebada9797a36adef39cda4f2544932731d0 [file] [log] [blame]
<!DOCTYPE HTML>
<title>SVGLengthList, removeItem()</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="resources/SVGLengthList-helper.js"></script>
<svg width="200" height="200">
<text x="500 50 100 900 150" y="50">ABC</text>
</svg>
<script>
test(function() {
// This is a test of the SVGLengthList.removeItem() API.
var list = document.querySelector("text").x.baseVal;
// Check initial list state of text.
assert_list(list, [500, 50, 100, 900, 150]);
// Remove first item.
assert_equals(list.removeItem(0).value, 500);
// Remove third item.
assert_equals(list.removeItem(2).value, 900);
});
</script>