blob: 1284347b6a6c5168be77da253087ed8e9fd7e618 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<div id="test" contenteditable><button>hello</button></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
Markup.description('This tests ensures contents inside a button element is properly editable.\n'
+ 'You should see "hello, world WebKit" inside the button and "world" should be bolded.');
var button = document.getElementsByTagName('button')[0];
window.getSelection().setPosition(button, 1);
document.execCommand('InsertText', false, ', world WebKit');
window.getSelection().modify('move', 'backward', 'word');
window.getSelection().modify('move', 'backward', 'word');
window.getSelection().modify('extend', 'forward', 'word');
document.execCommand('Bold', false, null);
Markup.dump('test');
</script>
</body>
</html>