Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / inserting / insert-without-inheriting-style.html
blob7e1e6353dc3e8e32b3eed82488c8ddc67276af58
1 <div id="container">
2 <div contenteditable="true" id="sample">foo <input type="button" value="bar"> baz</div>
3 </div>
4 <script src="../../resources/js-test.js"></script>
5 <script>
6 function $(id) { return document.getElementById(id); }
8 var range = document.createRange();
9 range.setStartAfter(document.querySelector('input'));
10 var selection = window.getSelection();
11 selection.removeAllRanges();
12 selection.addRange(range);
13 document.execCommand('Delete');
14 document.execCommand('InsertText', false, 'quux');
15 shouldBeEqualToString('$("sample").innerHTML', 'foo quux&nbsp;baz');
17 if (window.testRunner)
18 $('container').outerHTML = '';
19 </script>
20 </body>