Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / deleting / delete-blockquote-large-offsets.html
blob7ea982e05e6f021a42fd78b5dd379d8ab25bfa8d
1 <!DOCTYPE html>
2 <html>
3 <body>
4 This tests setting caret inside a blockquote with a large offset and running execCommand('Delete'). WebKit should not crash and you should see PASS below:
5 <div id="test" contentEditable="true">
6 <blockquote type="cite" id="blockquote" style="font-size: 0px; -webkit-min-logical-height: 4px;"><br></blockquote>
7 </div>
8 <script>
9 if (window.testRunner)
10 testRunner.dumpAsText();
12 window.getSelection().collapse(blockquote, blockquote.childNodes.length);
13 document.execCommand("Delete");
15 var test = document.getElementById('test');
16 if (test.innerHTML == '' || test.innerHTML == '<br>') // Allow a placeholder
17 document.writeln('PASS');
18 else
19 document.writeln('FAIL: expected empty line but got ' + test.innerHTML.replace('<', '&lt;'));
21 </script>
22 </body>
23 </html>