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

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: nits 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 Interface - getItem()</title>
fs 2016/09/14 15:14:35 Ditto.
Shanmuga Pandi 2016/09/15 06:18:19 Done.
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 text1 = document.querySelector("text");
fs 2016/09/14 15:14:35 Make this reference the list instead.
Shanmuga Pandi 2016/09/15 06:18:19 Done.
12
13 // Check lengths of text x item lists.
14 assert_equals(text1.x.baseVal.numberOfItems, 3);
15
16 // Test with various index parameters.
17 assert_throws("IndexSizeError", function() { text1.x.baseVal.getItem(-100); }) ;
18 assert_throws("IndexSizeError", function() { text1.x.baseVal.getItem(-1); });
19 assert_equals(text1.x.baseVal.getItem(0).value, 50);
20 assert_equals(text1.x.baseVal.getItem(1).value, 100);
21 assert_equals(text1.x.baseVal.getItem(2).value, 150);
22 assert_throws("IndexSizeError", function() { text1.x.baseVal.getItem(3); });
23 assert_throws("IndexSizeError", function() { text1.x.baseVal.getItem(100); });
24 });
25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698