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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <title>SVGLengthList, removeItem()</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <svg width="200" height="200">
6 <text x="500 50 100 900 150" y="50">ABC</text>
7 </svg>
8 <script>
9 test(function() {
10 // This is a test of the SVGLengthList::removeItem() API.
11 var list = document.querySelector("text").x.baseVal;
12
13 // Check initial list state of text");
Srirama 2016/09/17 11:27:53 nit: remove "); at the end of comment.
Shanmuga Pandi 2016/09/17 12:29:34 Done.
14 assert_equals(list.numberOfItems, 5);
15 assert_equals(list.getItem(0).value, 500);
16 assert_equals(list.getItem(1).value, 50);
17 assert_equals(list.getItem(2).value, 100);
18 assert_equals(list.getItem(3).value, 900);
19 assert_equals(list.getItem(4).value, 150);
20 assert_throws("IndexSizeError", function() { list.getItem(5); });
21
22 // Remove fourth item of text.
23 assert_equals(list.removeItem(0).value, 500);
24
25 // Remove third item of text.
26 assert_equals(list.removeItem(2).value, 900);
27 });
28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698