Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / selection / 5076323-1.html
1 <p>This tests for a bug where moving the selection to the end of the document would move it outside of an editable region if the selection started just before a table.</p>
2 <div id="div" contenteditable="true"><table contenteditable="false" style="border: 1px solid #aaa"><tr><td>foo</td></tr></table></div>
3 <p>In the above editable region, you should see 'foo' in the bordered table and 'bar' outside it.</p>
4 <script>
5 var sel = window.getSelection();
6 var div = document.getElementById("div");
7
8 sel.collapse(div, 0);
9 sel.modify("move", "forward", "documentBoundary");
10 document.execCommand("InsertText", false, "bar");
11 </script>