Editing tests should use testRunner instead of layoutTestController
[WebKit-https.git] / LayoutTests / editing / execCommand / boldSelection.html
1 <html> 
2 <head>
3 <title>Editing Test: extend selection and bold</title> 
4 </head> 
5 <body>
6 <p>This tests bolding the first 21 letters in the following sentence.  Every character (including spaces) before "jumps" must be bolded.
7 <div contenteditable id="root" class="editing">
8 <span id="test">"The quick brown fox jumps over the lazy dog" uses every
9 letter in the english language.
10 </span>
11 </div>
12 <p id="console"></p>
13
14 <script>
15
16 if (window.testRunner)
17     testRunner.dumpAsText();
18
19 var e = document.getElementById("test");
20 var selection = window.getSelection();
21 selection.setPosition(e, 0);
22
23 for (i = 0; i < 21; i++) {
24     selection.modify("extend", "forward", "character");
25     document.execCommand('bold', false, null);
26 }
27
28 document.body.appendChild(document.createTextNode(document.getElementById('test').innerHTML));
29
30 </script>
31
32 </body>
33 </html>