9b161e34f4c326179d9efabce7fbb0cf9dff70fe
[WebKit-https.git] / LayoutTests / editing / execCommand / 19653-1.html
1 <div id="description1">This tests creating a list from an empty paragraph with bold already applied to it. The word below should be bold.</div>
2 <div id="edit1" contentEditable="true"><div><b><br></b></div></div>
3
4 <div id="description2">This tests creating a list from an empty paragraph when the typing style was Bold. The word below should be bold.</div>
5 <div id="edit2" contentEditable="true"></div>
6
7 <div id="description3">This tests indenting an empty paragraph with bold already applied to it. The word below should be bold.</div>
8 <div id="edit3" contentEditable="true"><div><b><br></b></div></div>
9
10 <div id="description4">This tests indenting an empty paragraph when the typing style was Bold. The word below should be bold.</div>
11 <div id="edit4" contentEditable="true"></div>
12
13 <div id="description5">This tests outdenting an empty paragraph with bold already applied to it. The word below should be bold.</div>
14 <div id="edit5" contentEditable="true"><blockquote class="webkit-indent-blockquote"><b><br></b></blockquote></div>
15
16 <div id="description6">This tests indenting an empty paragraph when the typing style was Bold. The word below should be bold.</div>
17 <div id="edit6" contentEditable="true"></div>
18
19 <script>
20 if (window.layoutTestController)
21     window.layoutTestController.dumpAsText();
22 edit1 = document.getElementById("edit1");
23 edit1.focus();
24 document.execCommand("InsertUnorderedList");
25 document.execCommand("InsertText", false, "Bold");
26
27 edit2 = document.getElementById("edit2");
28 edit2.focus();
29 document.execCommand("Bold");
30 document.execCommand("InsertUnorderedList");
31 document.execCommand("InsertText", false, "Bold");
32
33 edit3 = document.getElementById("edit3");
34 edit3.focus();
35 document.execCommand("Indent");
36 document.execCommand("InsertText", false, "Bold");
37
38 edit4 = document.getElementById("edit4");
39 edit4.focus();
40 document.execCommand("Bold");
41 document.execCommand("Indent");
42 document.execCommand("InsertText", false, "Bold");
43
44 edit5 = document.getElementById("edit5");
45 edit5.focus();
46 document.execCommand("Outdent");
47 document.execCommand("InsertText", false, "Bold");
48
49 edit6 = document.getElementById("edit6");
50 edit6.focus();
51 document.execCommand("Bold");
52 document.execCommand("Outdent");
53 document.execCommand("InsertText", false, "Bold");
54
55 if (window.layoutTestController)
56     document.body.innerText = document.getElementById("description1").innerText + "\n" + edit1.innerHTML + "\n\n" +
57                               document.getElementById("description2").innerText + "\n" + edit2.innerHTML + "\n\n" +
58                               document.getElementById("description3").innerText + "\n" + edit3.innerHTML + "\n\n" +
59                               document.getElementById("description4").innerText + "\n" + edit4.innerHTML + "\n\n" +
60                               document.getElementById("description5").innerText + "\n" + edit5.innerHTML + "\n\n" +
61                               document.getElementById("description6").innerText + "\n" + edit6.innerHTML;
62
63 </script>