aaf1cd03869137519da322fe590024ff13faaa81
[WebKit-https.git] / LayoutTests / editing / deleting / 25322-1.html
1 <head>
2     <script>
3         function runTest() {
4             if (window.layoutTestController) {
5                 layoutTestController.dumpAsText();
6                 layoutTestController.waitUntilDone();
7             }
8             window.setTimeout(afterDelay, 20);
9         }
10         
11         function afterDelay() {
12             forCaret = document.getElementById("forCaret");
13             window.getSelection().setPosition(forCaret, 0);
14             document.execCommand("Delete");            
15             if (window.layoutTestController) {
16                 document.body.innerText = document.getElementById("description").innerText + "\n\n" + document.getElementById("edit").innerHTML;
17                 layoutTestController.notifyDone();
18             }
19         }
20     </script>
21 </head>
22
23 <body onLoad="runTest();">
24     <div id="description">This tests to make sure that placing the caret in an empty paragraph after a block image and pressing delete removes the empty paragraph. The editable region below should contain only an image followed by a caret.</div>
25     <div id="edit" contentEditable="true"><img src="../resources/abe.png" style="display:block; padding: 3px;"><div id="forCaret"><br></div></div>
26 </body>