| <!doctype html> |
| <script src="../../../resources/testharness.js"></script> |
| <script src="../../../resources/testharnessreport.js"></script> |
| <script src="../../assert_selection.js"></script> |
| <script> |
| if (window.internals) |
| internals.settings.setEditingBehavior('win'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">|abc def <span dir="ltr">hij opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">|abc def <span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-0 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">a|bc def <span dir="ltr">hij opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">|abc def <span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-1 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">ab|c def <span dir="ltr">hij opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">|abc def <span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-2 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc| def <span dir="ltr">hij opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">|abc def <span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-3 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc |def <span dir="ltr">hij opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">|abc def <span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-4 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc d|ef <span dir="ltr">hij opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc |def <span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-5 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc de|f <span dir="ltr">hij opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc |def <span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-6 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def| <span dir="ltr">hij opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc |def <span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-7 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def |<span dir="ltr">hij opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc |def <span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-8 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">|hij opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc |def <span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-9 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">h|ij opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def |<span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-10 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hi|j opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def |<span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-11 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij| opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def |<span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-12 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij |opq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def |<span dir="ltr">hij opq</span> rst uvw</div>', |
| '5-13 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij o|pq</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij |opq</span> rst uvw</div>', |
| '5-14 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij op|q</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij |opq</span> rst uvw</div>', |
| '5-15 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq|</span> rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij |opq</span> rst uvw</div>', |
| '5-16 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span>| rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij |opq</span> rst uvw</div>', |
| '5-17 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> |rst uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij |opq</span> rst uvw</div>', |
| '5-18 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> r|st uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> |rst uvw</div>', |
| '5-19 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rs|t uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> |rst uvw</div>', |
| '5-20 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rst| uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> |rst uvw</div>', |
| '5-21 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rst |uvw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> |rst uvw</div>', |
| '5-22 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rst u|vw</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rst |uvw</div>', |
| '5-23 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rst uv|w</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rst |uvw</div>', |
| '5-24 right word'); |
| |
| selection_test( |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rst uvw|</div>', |
| selection => selection.modify('move', 'right', 'word'), |
| '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rst |uvw</div>', |
| '5-25 right word'); |
| </script> |