Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / insert-image-on-top-of-directional-text.html
blob5597930350ec296f1221589cbe560326910a0c54
1 <div>This test uses execCommand('insertImage') to replace the selection in a variety of mixed directionality text. If this doesn't crash, then the test passes.</div>
2 <div dir='rtl' id='rtl1' style='white-space:pre' contentEditable>the </div>
3 <div dir='rtl' id='rtl2' style='white-space:pre' contentEditable>אחת </div>
4 <div dir='ltr' id='ltr1' style='white-space:pre' contentEditable>the </div>
5 <div dir='ltr' id='ltr2' style='white-space:pre' contentEditable>אחת </div>
6 <script>
7 if (window.testRunner)
8 testRunner.dumpAsText();
10 // Select only "the", not the space, LTR text in RTL region.
11 document.getSelection().setBaseAndExtent(rtl1.firstChild, 0, rtl1.firstChild, 3);
12 document.execCommand('InsertImage', false, "../resources/abe.png");
13 // Select only "אחת", not the space, RTL text in RTL region.
14 document.getSelection().setBaseAndExtent(rtl2.firstChild, 0, rtl2.firstChild, 3);
15 document.execCommand('InsertImage', false, "../resources/abe.png");
16 // Select only "the", not the space, LTR text in LTR region.
17 document.getSelection().setBaseAndExtent(ltr1.firstChild, 0, ltr1.firstChild, 3);
18 document.execCommand('InsertImage', false, "../resources/abe.png");
19 // Select only "אחת", not the space, RTL text in LTR region.
20 document.getSelection().setBaseAndExtent(ltr2.firstChild, 0, ltr2.firstChild, 3);
21 document.execCommand('InsertImage', false, "../resources/abe.png");
22 </script>