| <!DOCTYPE html> |
| <html> |
| <body> |
| <script src="../../fast/dom/resources/event-sender-util.js"></script> |
| |
| <p>Pressing enter on the last character of <li> element in Shadow DOM was triggering assertion, |
| becasue modifying Shadow DOM removes the renderer in Shadow DOM and desendant of shadow host.</p> |
| <p>This tests confirms it won't happen any more.</p> |
| |
| <div id="container"> |
| <ol id="host" contenteditable> |
| <li>LIST 1</li> |
| <li id="list2">LIST 2</li> |
| <li>LIST 3</li> |
| </ol> |
| </div> |
| |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| var shadowRoot = host.createShadowRoot(); |
| var li = document.createElement('li'); |
| li.innerHTML = 'inside shadow'; |
| shadowRoot.appendChild(li); |
| shadowRoot.appendChild(document.createElement('shadow')); |
| |
| eventSender.mouseMoveTo(list2.offsetLeft + list2.offsetWidth - 10, list2.offsetTop + list2.offsetHeight / 2); |
| eventSender.mouseDown(); |
| eventSender.mouseUp(); |
| |
| eventSender.keyDown('\n'); |
| |
| container.innerHTML = "PASS"; |
| </script> |
| </body> |
| </html> |