| <!DOCTYPE html> |
| <html> |
| <body> |
| <div>This tests to see if a line break is incorrectly inserted when you delete the content directly following a button.</div> |
| <div id="container" contenteditable="true"><button>button</button> this text should be on the same line as the button</div> |
| <div id="result">FAIL</div> |
| </body> |
| <script> |
| var target = document.getElementById("container"); |
| window.getSelection().setPosition(target, 1); |
| window.getSelection().modify("move", "right", "character"); |
| document.execCommand("delete"); |
| if (target.childNodes.length == 2) |
| document.getElementById("result").innerHTML = "PASS"; |
| if (window.testRunner) |
| window.testRunner.dumpAsText(); |
| </script> |
| </html> |