Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / shadow / pressing-enter-on-list.html
blob5721ffbe31d7691b80b86b9f8259458c107f0002
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../fast/dom/resources/event-sender-util.js"></script>
6 <p>Pressing enter on the last character of &lt;li&gt; element in Shadow DOM was triggering assertion,
7 becasue modifying Shadow DOM removes the renderer in Shadow DOM and desendant of shadow host.</p>
8 <p>This tests confirms it won't happen any more.</p>
10 <div id="container">
11 <ol id="host" contenteditable>
12 <li>LIST 1</li>
13 <li id="list2">LIST 2</li>
14 <li>LIST 3</li>
15 </ol>
16 </div>
18 <script>
19 if (window.testRunner)
20 testRunner.dumpAsText();
22 var shadowRoot = host.createShadowRoot();
23 var li = document.createElement('li');
24 li.innerHTML = 'inside shadow';
25 shadowRoot.appendChild(li);
26 shadowRoot.appendChild(document.createElement('shadow'));
28 eventSender.mouseMoveTo(list2.offsetLeft + list2.offsetWidth - 10, list2.offsetTop + list2.offsetHeight / 2);
29 eventSender.mouseDown();
30 eventSender.mouseUp();
32 eventSender.keyDown('\n');
34 container.innerHTML = "PASS";
35 </script>
36 </body>
37 </html>