| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <body> | 3 <body> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 | 5 |
| 6 <p>Elements distributed to Shadow DOM should be deleted correctly when pressing
delete key.</p> | 6 <p>Elements distributed to Shadow DOM should be deleted correctly when pressing
delete key.</p> |
| 7 <p>To test manually, select somewhere in ABCDE from somehwere in 12345, and pres
s delete, and check the selected text is deleted correctly.</p> | 7 <p>To test manually, select somewhere in ABCDE from somehwere in 12345, and pres
s delete, and check the selected text is deleted correctly.</p> |
| 8 | 8 |
| 9 <div id="container"> | 9 <div id="container"> |
| 10 <ol id="host" contenteditable> | 10 <ol id="host" contenteditable> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 var shadow = document.createElement('shadow'); | 26 var shadow = document.createElement('shadow'); |
| 27 shadow.appendChild(document.createElement('content')); | 27 shadow.appendChild(document.createElement('content')); |
| 28 shadowRoot.appendChild(shadow); | 28 shadowRoot.appendChild(shadow); |
| 29 | 29 |
| 30 if (window.eventSender) { | 30 if (window.eventSender) { |
| 31 eventSender.mouseMoveTo(list1.offsetLeft + 20, list1.offsetTop + list1.offse
tHeight / 2); | 31 eventSender.mouseMoveTo(list1.offsetLeft + 20, list1.offsetTop + list1.offse
tHeight / 2); |
| 32 eventSender.mouseDown(); | 32 eventSender.mouseDown(); |
| 33 eventSender.mouseMoveTo(list3.offsetLeft + 20, list3.offsetTop + list3.offse
tHeight / 2); | 33 eventSender.mouseMoveTo(list3.offsetLeft + 20, list3.offsetTop + list3.offse
tHeight / 2); |
| 34 eventSender.mouseUp(); | 34 eventSender.mouseUp(); |
| 35 | 35 |
| 36 eventSender.keyDown('delete'); | 36 eventSender.keyDown('Delete'); |
| 37 | 37 |
| 38 var hostTextContent = host.textContent.replace(/^\s+|\s+$/g, ''); | 38 var hostTextContent = host.textContent.replace(/^\s+|\s+$/g, ''); |
| 39 shouldBe("hostTextContent", "'AB345'"); | 39 shouldBe("hostTextContent", "'AB345'"); |
| 40 container.innerHTML = ""; | 40 container.innerHTML = ""; |
| 41 } | 41 } |
| 42 </script> | 42 </script> |
| 43 | 43 |
| 44 </body> | 44 </body> |
| 45 </html> | 45 </html> |
| OLD | NEW |