| OLD | NEW |
| 1 description("Test that collapseToStart() and collapseToEnd() throw INVALID_STATE
_ERR if no selection is made."); | 1 description("Test that collapseToStart() and collapseToEnd() throw INVALID_STATE
_ERR if no selection is made."); |
| 2 | 2 |
| 3 var sel = window.getSelection(); | 3 var sel = window.getSelection(); |
| 4 var textNode = document.createTextNode("abcdef"); | 4 var textNode = document.createTextNode("abcdef"); |
| 5 document.body.appendChild(textNode); | 5 document.body.appendChild(textNode); |
| 6 | 6 |
| 7 shouldThrow("sel.collapseToStart()", "'Error: InvalidStateError: DOM Exception 1
1'"); | 7 shouldThrow("sel.collapseToStart()", "'InvalidStateError: An attempt was made to
use an object that is not, or is no longer, usable.'"); |
| 8 shouldThrow("sel.collapseToEnd()", "'Error: InvalidStateError: DOM Exception 11'
"); | 8 shouldThrow("sel.collapseToEnd()", "'InvalidStateError: An attempt was made to u
se an object that is not, or is no longer, usable.'"); |
| 9 | 9 |
| 10 sel.selectAllChildren(textNode); | 10 sel.selectAllChildren(textNode); |
| 11 | 11 |
| 12 shouldBe("sel.collapseToStart()", "undefined"); | 12 shouldBe("sel.collapseToStart()", "undefined"); |
| 13 shouldBe("sel.collapseToEnd()", "undefined"); | 13 shouldBe("sel.collapseToEnd()", "undefined"); |
| 14 | 14 |
| 15 document.body.removeChild(textNode); | 15 document.body.removeChild(textNode); |
| OLD | NEW |