| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <svg id="svg"> |
| 5 <g id="g"></g> |
| 6 <text id="text">Fail</text> |
| 7 </svg> |
| 8 <script> |
| 9 test(function() { |
| 10 // Create an empty text node through the editing apis. |
| 11 var oSelection=window.getSelection(); |
| 12 document.execCommand('SelectAll', false, false) |
| 13 var oRange = oSelection.getRangeAt(0); |
| 14 oRange.insertNode(g); |
| 15 // Force the text length to be calculated. |
| 16 text.getComputedTextLength(); |
| 17 svg.parentElement.removeChild(svg); |
| 18 }, 'Empty text nodes should not crash.'); |
| 19 </script> |
| OLD | NEW |