Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / selection / character-data-mutation-crash.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p>This tests modifying the value of text node that's pointed by the selection and executing an editing command. WebKit should not crash and you should see PASS:</p>
5 <div id="test" contenteditable>hello world</div>
6 <script>
7
8 if (window.testRunner)
9     testRunner.dumpAsText();
10
11 var test = document.getElementById('test');
12 test.focus();
13 window.getSelection().setBaseAndExtent(test.firstChild, 1, test.firstChild, 10);
14 test.firstChild.data = 'hey';
15 document.execCommand('insertLineBreak', false, null);
16
17 test.innerHTML = 'PASS';
18
19 </script>
20 </body>
21 </html>