Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / shadow / select-contenteditable-shadowhost.html
blobbad22a231bcbfb8e332919faf3c3cbc6f46a6fa7
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../resources/js-test.js"></script>
5 <script src="../../fast/dom/resources/event-sender-util.js"></script>
7 <p>This test confirms that selecting an element having Shadow DOM doesn't cross editing boundaries errornously.</p>
9 <div>
10 <div id="before">BEFORE</div>
11 <div id="host" contenteditable>HOST</div>
12 <div id="after">AFTER</div>
13 </div>
15 <pre id="console"></pre>
17 <script>
19 var shadowRoot = host.createShadowRoot();
20 shadowRoot.innerHTML = "SHADOW DOM";
22 var selection = shadowRoot.getSelection();
24 debug('Move mouse from BEFORE to HOST');
26 mouseMoveToElem(before);
27 eventSender.mouseDown();
28 mouseMoveToElem(host);
29 eventSender.mouseUp();
30 shouldBeNull('selection.anchorNode');
31 shouldBeNull('selection.focusNode');
33 // Check crash won't happen.
34 document.execCommand('delete');
35 debug('PASS document.execCommand("delete") did not crash.');
37 debug('');
38 debug('Move mouse from AFTER to HOST');
40 mouseMoveToElem(after);
41 eventSender.mouseDown();
42 mouseMoveToElem(host);
43 eventSender.mouseUp();
44 shouldBeNull('selection.anchorNode');
45 shouldBeNull('selection.focusNode');
46 // Check crash won't happen.
47 document.execCommand('delete');
48 debug('PASS document.execCommand("delete") did not crash.');
50 var successfullyParsed = true;
51 </script>
52 </body>
54 </html>