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

Unified Diff: third_party/WebKit/LayoutTests/svg/dom/SVGLengthList-removeItem.html

Issue 2344403002: Convert LayoutTests/svg/dom/SVGLengthList*.html js-tests.js to testharness.js based tests (Closed)
Patch Set: Align with review comments Created 4 years, 3 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: 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..0b7a719f04f3aceb3cfbf87132b622c4cace7225
--- /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.
+ 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 first item.
+ assert_equals(list.removeItem(0).value, 500);
+
+ // Remove third item.
+ assert_equals(list.removeItem(2).value, 900);
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698