| OLD | NEW |
| 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> | |
| OLD | NEW |