Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: LayoutTests/editing/deleting/delete-and-cleanup.html

Issue 14969020: Avoid adding placeholder when deleting last text in root (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed bad TestExpectations behavior and unnecessary results churn. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698