Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/svg/dom/SVGLengthList-removeItem.html |
| diff --git a/third_party/WebKit/LayoutTests/svg/dom/SVGLengthList-removeItem.html b/third_party/WebKit/LayoutTests/svg/dom/SVGLengthList-removeItem.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d0cef446c6d42bea8eca914ab3de350f6ad1508a |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/svg/dom/SVGLengthList-removeItem.html |
| @@ -0,0 +1,28 @@ |
| +<!DOCTYPE HTML> |
| +<title>SVGLengthList, removeItem()</title> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.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. |
|
fs
2016/09/17 17:42:37
Like in previous test(s)
Shanmuga Pandi
2016/09/19 07:40:04
Done.
|
| + var list = document.querySelector("text").x.baseVal; |
| + |
| + // Check initial list state of text. |
| + assert_equals(list.numberOfItems, 5); |
| + assert_equals(list.getItem(0).value, 500); |
| + assert_equals(list.getItem(1).value, 50); |
| + assert_equals(list.getItem(2).value, 100); |
| + assert_equals(list.getItem(3).value, 900); |
| + assert_equals(list.getItem(4).value, 150); |
| + assert_throws("IndexSizeError", function() { list.getItem(5); }); |
| + |
| + // Remove fourth item of text. |
|
fs
2016/09/17 17:42:37
s/fourth/first/? (Can probably drop "of text" too.
Shanmuga Pandi
2016/09/19 07:40:04
Done.
|
| + assert_equals(list.removeItem(0).value, 500); |
| + |
| + // Remove third item of text. |
| + assert_equals(list.removeItem(2).value, 900); |
| +}); |
| +</script> |