upload tizen1.0 source
[framework/web/webkit-efl.git] / LayoutTests / editing / execCommand / button.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <div id="test" contenteditable><button>hello</button></div>
5 <script src="../../resources/dump-as-markup.js"></script>
6 <script>
7
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.');
10
11 var button = document.getElementsByTagName('button')[0];
12 window.getSelection().setPosition(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);
18
19 Markup.dump('test');
20
21 </script>
22 </body>
23 </html>