| Index: third_party/WebKit/LayoutTests/fast/dom/Selection/collapseToX-empty-selection.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/Selection/collapseToX-empty-selection.html b/third_party/WebKit/LayoutTests/fast/dom/Selection/collapseToX-empty-selection.html
|
| index 8029bda7fc222397850b057f518655c9c5f04b37..983744a55b021353626c97735cb6e6f051f1d3c4 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/dom/Selection/collapseToX-empty-selection.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/dom/Selection/collapseToX-empty-selection.html
|
| @@ -4,6 +4,22 @@
|
| <script src="../../../resources/js-test.js"></script>
|
| </head>
|
| <body>
|
| -<script src="script-tests/collapseToX-empty-selection.js"></script>
|
| +<script>
|
| +description("Test that collapseToStart() and collapseToEnd() throw INVALID_STATE_ERR if no selection is made.");
|
| +
|
| +var sel = window.getSelection();
|
| +var textNode = document.createTextNode("abcdef");
|
| +document.body.appendChild(textNode);
|
| +
|
| +shouldThrow("sel.collapseToStart()", '"InvalidStateError: Failed to execute \'collapseToStart\' on \'Selection\': there is no selection."');
|
| +shouldThrow("sel.collapseToEnd()", '"InvalidStateError: Failed to execute \'collapseToEnd\' on \'Selection\': there is no selection."');
|
| +
|
| +sel.selectAllChildren(textNode);
|
| +
|
| +shouldBe("sel.collapseToStart()", "undefined");
|
| +shouldBe("sel.collapseToEnd()", "undefined");
|
| +
|
| +document.body.removeChild(textNode);
|
| +</script>
|
| </body>
|
| </html>
|
|
|