4 <div id=
"test" contenteditable
><button>hello
</button></div>
5 <script src=
"../../resources/dump-as-markup.js"></script>
8 Markup
.description('This tests ensures contents inside a button element is properly editable.\n'
9 + 'You should see "hello, world WebKit" inside the button and "world" should be bolded.');
11 var button
= document
.getElementsByTagName('button')[0];
12 window
.getSelection().collapse(button
, 1);
13 document
.execCommand('InsertText', false, ', world WebKit');
14 window
.getSelection().modify('move', 'backward', 'word');
15 window
.getSelection().modify('move', 'backward', 'word');
16 window
.getSelection().modify('extend', 'forward', 'word');
17 document
.execCommand('Bold', false, null);