Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / deleting / delete-br-after-image.html
blobbec747a2d9e4760d697f887c966c04089b95cabb
1 <body>
2 <div id="container">
3 <div contenteditable="true" id="work">
4 <span id="sample"><img width="70" height="70" style="background: #DEF"><br>[click here, hold backspace]</span>
5 </div>
6 </div>
7 </div>
8 <script src="../../resources/js-test.js"></script>
9 <script>
10 function $(id) { return document.getElementById(id); }
12 var range = document.createRange();
13 range.setStartAfter($('work').querySelector('br'));
14 var selection = window.getSelection();
15 selection.removeAllRanges();
16 selection.addRange(range);
17 document.execCommand('Delete');
18 shouldBeEqualToString('$("sample").innerHTML', '<img width="70" height="70" style="background: #DEF">[click here, hold backspace]');
19 shouldBeEqualToString('selection.type', 'Caret');
20 shouldBe('selection.anchorNode', '$("sample")');
21 shouldBe('selection.anchorOffset', '1');
22 if (window.testRunner)
23 $('container').outerHTML = '';
24 </script>
25 </body>