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