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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/SVGLengthList-setEmptyString.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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <svg id="svg" xmlns="http://www.w3.org/2000/svg" width="200" height="200"> 2 <title>SVGLengthList, set empty string</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <svg width="200" height="200">
3 <text></text> 6 <text></text>
4 </svg> 7 </svg>
5 <script src="../../resources/js-test.js"></script>
6 <script> 8 <script>
7 if (window.testRunner) 9 test(function() {
8 testRunner.dumpAsText(); 10 var text = document.querySelector('text');
11 var list = text.x.baseVal;
12 text.setAttribute("x", "1 2 3");
13 assert_equals(list.numberOfItems, 3);
14 text.setAttribute("x", "");
15 assert_equals(list.numberOfItems, 0);
9 16
10 var text = document.querySelector('text'); 17 text.setAttribute("x", "1 2 3");
11 text.setAttribute("x", "1 2 3"); 18 assert_equals(list.numberOfItems, 3);
12 shouldBe("text.x.baseVal.numberOfItems", "3"); 19 text.removeAttribute("x");
13 text.setAttribute("x", ""); 20 assert_equals(list.numberOfItems, 0);
14 shouldBe("text.x.baseVal.numberOfItems", "0"); 21 });
15 22 </script>
16 text.setAttribute("x", "1 2 3");
17 shouldBe("text.x.baseVal.numberOfItems", "3");
18 text.removeAttribute("x");
19 shouldBe("text.x.baseVal.numberOfItems", "0");
20 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698