OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../fast/js/resources/js-test-pre.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <p id="description">This test checks that deletion does not leave unnecessary ne
sted divs.</p> | 7 <p id="description">This test checks that deletion does not leave unnecessary ne
sted divs.</p> |
8 <div id="console"></div> | 8 <div id="console"></div> |
9 <script> | 9 <script> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 node.focus(); | 27 node.focus(); |
28 document.execCommand("SelectAll", false); | 28 document.execCommand("SelectAll", false); |
29 document.execCommand("Delete", false); | 29 document.execCommand("Delete", false); |
30 | 30 |
31 confirmedMarkup = node.innerHTML; | 31 confirmedMarkup = node.innerHTML; |
32 | 32 |
33 shouldBe("confirmedMarkup", "'" + expected + "'"); | 33 shouldBe("confirmedMarkup", "'" + expected + "'"); |
34 } | 34 } |
35 | 35 |
36 testDelete("div", "Hello", "<br>"); | 36 testDelete("div", "Hello", ""); |
37 testDelete("div", "<div>Hello</div>", "<br>"); | 37 testDelete("div", "<div>Hello</div>", "<br>"); |
38 testDelete("div", "<div id=\"mydiv\">Hello</div>", "<div id=\"mydiv\"><br></div>
"); | 38 testDelete("div", "<div id=\"mydiv\">Hello</div>", "<div id=\"mydiv\"><br></div>
"); |
39 testDelete("div", "<div><div>Hello</div></div>", "<br>"); | 39 testDelete("div", "<div><div>Hello</div></div>", "<br>"); |
40 testDelete("div", "<div><b><div><i>Hello</i></div></b></div>", "<b><br></b>"); | 40 testDelete("div", "<div><b><div><i>Hello</i></div></b></div>", "<b><br></b>"); |
41 testDelete("div", "<div><b><div style=\"border: solid red\"><i>Hello</i></div></
b></div>", "<b><div style=\"border: solid red\"><br></div></b>"); | 41 testDelete("div", "<div><b><div style=\"border: solid red\"><i>Hello</i></div></
b></div>", "<b><div style=\"border: solid red\"><br></div></b>"); |
42 testDelete("div", "<div>Hello</div><div>world</div>", "<br>"); | 42 testDelete("div", "<div>Hello</div><div>world</div>", "<br>"); |
43 testDelete("div", "<div>Hello</div><div>world</div>", "<br>"); | 43 testDelete("div", "<div>Hello</div><div>world</div>", "<br>"); |
44 testDelete("div", "<div><p>Hello</p></div><p>world</p></div>", "<p><br></p>"); | 44 testDelete("div", "<div><p>Hello</p></div><p>world</p></div>", "<p><br></p>"); |
45 | 45 |
46 root.style.display = "none"; | 46 root.style.display = "none"; |
47 | 47 |
48 </script> | 48 </script> |
49 <script src="../../fast/js/resources/js-test-post.js"></script> | 49 <script src="../../fast/js/resources/js-test-post.js"></script> |
50 </body> | 50 </body> |
51 </html> | 51 </html> |
OLD | NEW |