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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/SVGLengthList-getItem.html

Issue 2340733002: 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <title>SVGLengthList, getItem()</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <svg width="200" height="200">
6 <text x="50 100 150" y="50">ABC</text>
7 </svg>
8 <script>
9 test(function() {
10 // This is a test of the SVGLengthList::getItem() API.
11 var xList = document.querySelector("text").x.baseVal;
12
13 // Check lengths of text x item lists.
14 assert_equals(xList.numberOfItems, 3);
15
16 // Test with various index parameters.
17 assert_throws("IndexSizeError", function() { xList.getItem(-100); });
18 assert_throws("IndexSizeError", function() { xList.getItem(-1); });
19 assert_equals(xList.getItem(0).value, 50);
20 assert_equals(xList.getItem(1).value, 100);
21 assert_equals(xList.getItem(2).value, 150);
22 assert_throws("IndexSizeError", function() { xList.getItem(3); });
23 assert_throws("IndexSizeError", function() { xList.getItem(100); });
24 });
25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698