Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / shadow / bold-twice-in-shadow.html
blob54ccad75d5401480301ec023ed32e9be5721578d
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../fast/dom/resources/event-sender-util.js"></script>
6 <p>Applying document.execCommand('Bold') to elements having insertion points (&lt;shadow&gt; or &lt;content&gt;) shoud not cause a crash.</p>
7 <p>To test manually, make a selection from somewhere in "nested before" to somehwere in "nested after", then press Ctrl+B twice. It should not cause a crash.</p>
9 <div id="container" contenteditable>
10 before host
11 <div id="host"> <span contenteditable="false">not editable<span></div>
12 after host
13 </div>
14 <pre id="console"></pre>
16 <script>
17 if (window.testRunner)
18 testRunner.dumpAsText();
20 var shadowRoot = host.createShadowRoot();
21 shadowRoot.innerHTML = '<div id="shadow-host"><span contenteditable>shadow before</span><shadow></shadow>shadow (after)</div>';
23 var nestedShadowHost = shadowRoot.getElementById('shadow-host');
24 var nestedShadowRoot = nestedShadowHost.createShadowRoot();
25 nestedShadowRoot.innerHTML = '<div id="inner" contenteditable>nested before<shadow></shadow>nested after</div>';
27 if (window.eventSender) {
28 var div = nestedShadowRoot.getElementById('inner');
30 eventSender.mouseMoveTo(div.offsetLeft + 5, div.offsetTop + div.offsetHeight / 2);
31 eventSender.mouseDown();
32 eventSender.mouseMoveTo(div.offsetLeft + div.offsetWidth - 5, div.offsetTop + div.offsetHeight / 2);
33 eventSender.mouseUp();
35 document.execCommand('Bold');
36 document.execCommand('Bold');
38 container.innerHTML = "PASS";
40 </script>
41 </body>
42 </html>