upload tizen1.0 source
[framework/web/webkit-efl.git] / LayoutTests / editing / execCommand / 5080333-1.html
1 <p>This tests for a bug where changing the alignment of an image would result in a selection that wasn't the one that was present before the alignment change.  The image should be centered and the caret should be the same before and after the operation.</p>
2 <div id="div" contenteditable="true">foo<br><img src="../resources/abe.png"><br>baz</div>
3
4 <script>
5 var div = document.getElementById("div");
6 var sel = window.getSelection();
7
8 sel.setPosition(div, 0);
9 sel.modify("move", "forward", "paragraphBoundary");
10 sel.modify("move", "forward", "character");
11
12 document.execCommand("JustifyCenter");
13 </script>