chromium/third_party/blink/web_tests/editing/selection/modify_move/move_left_character_23_ltr.html

<!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\n        <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">|Lorem\n        <div></div>\n        ipsum</div>',
  '23-0 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">L|orem\n        <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">|Lorem\n        <div></div>\n        ipsum</div>',
  '23-1 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lo|rem\n        <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">L|orem\n        <div></div>\n        ipsum</div>',
  '23-2 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lor|em\n        <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lo|rem\n        <div></div>\n        ipsum</div>',
  '23-3 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lore|m\n        <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lor|em\n        <div></div>\n        ipsum</div>',
  '23-4 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem|\n        <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lore|m\n        <div></div>\n        ipsum</div>',
  '23-5 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n|        <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lore|m\n        <div></div>\n        ipsum</div>',
  '23-6 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n |       <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lore|m\n        <div></div>\n        ipsum</div>',
  '23-7 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n  |      <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lore|m\n        <div></div>\n        ipsum</div>',
  '23-8 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n   |     <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lore|m\n        <div></div>\n        ipsum</div>',
  '23-9 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n    |    <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lore|m\n        <div></div>\n        ipsum</div>',
  '23-10 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n     |   <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lore|m\n        <div></div>\n        ipsum</div>',
  '23-11 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n      |  <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lore|m\n        <div></div>\n        ipsum</div>',
  '23-12 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n       | <div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lore|m\n        <div></div>\n        ipsum</div>',
  '23-13 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        |<div></div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lore|m\n        <div></div>\n        ipsum</div>',
  '23-14 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div>|</div>\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem|\n        <div></div>\n        ipsum</div>',
  '23-15 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>|\n        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem|\n        <div></div>\n        ipsum</div>',
  '23-16 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n|        ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem|\n        <div></div>\n        ipsum</div>',
  '23-17 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n |       ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem|\n        <div></div>\n        ipsum</div>',
  '23-18 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n  |      ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem|\n        <div></div>\n        ipsum</div>',
  '23-19 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n   |     ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem|\n        <div></div>\n        ipsum</div>',
  '23-20 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n    |    ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem|\n        <div></div>\n        ipsum</div>',
  '23-21 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n     |   ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem|\n        <div></div>\n        ipsum</div>',
  '23-22 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n      |  ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem|\n        <div></div>\n        ipsum</div>',
  '23-23 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n       | ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem|\n        <div></div>\n        ipsum</div>',
  '23-24 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n        |ipsum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem|\n        <div></div>\n        ipsum</div>',
  '23-25 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n        i|psum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n        |ipsum</div>',
  '23-26 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n        ip|sum</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n        i|psum</div>',
  '23-27 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n        ips|um</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n        ip|sum</div>',
  '23-28 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n        ipsu|m</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n        ips|um</div>',
  '23-29 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n        ipsum|</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">Lorem\n        <div></div>\n        ipsu|m</div>',
  '23-30 ltr left character');
</script>