blob: fb4f405dab82b4099f502d726f4cb9459ca55ab5 [file] [log] [blame]
<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
selection_test(
'<div contenteditable dir="ltr">|Lorem <div dir="rtl">ipsum dolor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">^L|orem <div dir="rtl">ipsum dolor sit</div> amett</div>',
'5-0 ltr right character');
selection_test(
'<div contenteditable dir="ltr">L|orem <div dir="rtl">ipsum dolor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">L^o|rem <div dir="rtl">ipsum dolor sit</div> amett</div>',
'5-1 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lo|rem <div dir="rtl">ipsum dolor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lo^r|em <div dir="rtl">ipsum dolor sit</div> amett</div>',
'5-2 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lor|em <div dir="rtl">ipsum dolor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lor^e|m <div dir="rtl">ipsum dolor sit</div> amett</div>',
'5-3 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lore|m <div dir="rtl">ipsum dolor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lore^m| <div dir="rtl">ipsum dolor sit</div> amett</div>',
'5-4 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem| <div dir="rtl">ipsum dolor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem ^<div dir="rtl">|ipsum dolor sit</div> amett</div>',
'5-5 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">|ipsum dolor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem |<div dir="rtl">^ipsum dolor sit</div> amett</div>',
'5-6 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">i|psum dolor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">|i^psum dolor sit</div> amett</div>',
'5-7 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ip|sum dolor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">i|p^sum dolor sit</div> amett</div>',
'5-8 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ips|um dolor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ip|s^um dolor sit</div> amett</div>',
'5-9 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsu|m dolor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ips|u^m dolor sit</div> amett</div>',
'5-10 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum| dolor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsu|m^ dolor sit</div> amett</div>',
'5-11 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum |dolor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum| ^dolor sit</div> amett</div>',
'5-12 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum d|olor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum |d^olor sit</div> amett</div>',
'5-13 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum do|lor sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum d|o^lor sit</div> amett</div>',
'5-14 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dol|or sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum do|l^or sit</div> amett</div>',
'5-15 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolo|r sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dol|o^r sit</div> amett</div>',
'5-16 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor| sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolo|r^ sit</div> amett</div>',
'5-17 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor |sit</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor| ^sit</div> amett</div>',
'5-18 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor s|it</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor |s^it</div> amett</div>',
'5-19 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor si|t</div> amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor s|i^t</div> amett</div>',
'5-20 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div>| amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div> ^a|mett</div>',
'5-21 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div> |amett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div> ^a|mett</div>',
'5-22 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div> a|mett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div> a^m|ett</div>',
'5-23 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div> am|ett</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div> am^e|tt</div>',
'5-24 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div> ame|tt</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div> ame^t|t</div>',
'5-25 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div> amet|t</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div> amet^t|</div>',
'5-26 ltr right character');
selection_test(
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div> amett|</div>',
selection => selection.modify('extend', 'right', 'character'),
'<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor sit</div> amett|</div>',
'5-27 ltr right character');
</script>