| Index: third_party/WebKit/LayoutTests/editing/selection/modify_move/move_around_image.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_around_image.html b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_around_image.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..42336ea5f92c29bb3e3868aba10fe0c0c07123b1
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_around_image.html
|
| @@ -0,0 +1,71 @@
|
| +<!doctype html>
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| +<script src="../../assert_selection.js"></script>
|
| +<script>
|
| +const isMac = navigator.platform.indexOf('Mac') === 0;
|
| +
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>',
|
| + '|foo <img src="../../resources/abe.png"> bar',
|
| + '</div>',
|
| + ].join(''),
|
| + selection => selection.modify('move', 'forward', 'sentence'),
|
| + [
|
| + '<div contenteditable>',
|
| + 'foo <img src="../../resources/abe.png"> bar|',
|
| + '</div>',
|
| + ].join('')),
|
| + 'Move forward sentence');
|
| +
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>',
|
| + 'foo <img src="../../resources/abe.png"> bar|',
|
| + '</div>',
|
| + ].join(''),
|
| + selection => selection.modify('move', 'backward', 'sentence'),
|
| + [
|
| + '<div contenteditable>',
|
| + '|foo <img src="../../resources/abe.png"> bar',
|
| + '</div>',
|
| + ].join('')),
|
| + 'Move backward sentence');
|
| +
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>',
|
| + '|foo<img src="../../resources/abe.png">bar baz',
|
| + '</div>',
|
| + ].join(''),
|
| + selection => {
|
| + selection.modify('move', 'forward', 'word');
|
| + selection.modify('move', 'forward', 'word');
|
| + },
|
| + [
|
| + '<div contenteditable>',
|
| + isMac
|
| + ? 'foo<img src="../../resources/abe.png">bar| baz'
|
| + : 'foo<img src="../../resources/abe.png">bar |baz',
|
| + '</div>',
|
| + ].join('')),
|
| + 'Move forward word');
|
| +
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>',
|
| + 'foo bar<img src="../../resources/abe.png">baz|',
|
| + '</div>',
|
| + ].join(''),
|
| + selection => {
|
| + selection.modify('move', 'backward', 'word');
|
| + selection.modify('move', 'backward', 'word');
|
| + },
|
| + [
|
| + '<div contenteditable>',
|
| + 'foo |bar<img src="../../resources/abe.png">baz',
|
| + '</div>',
|
| + ].join('')),
|
| + 'Move backward word');
|
| +</script>
|
|
|