blob: 74ba0721ff632580302d2a3f4547e9a92a458c35 [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().collapse(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>