Chromium Code Reviews| 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..640569c3812d78c2a9b6071e8d90379dcbccb186 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_around_image.html |
| @@ -0,0 +1,61 @@ |
| +<!doctype html> |
| +<script src="../../../resources/testharness.js"></script> |
| +<script src="../../../resources/testharnessreport.js"></script> |
| +<script src="../../assert_selection.js"></script> |
| +<script> |
| +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', |
| + '</div>', |
| + ].join(''), |
| + selection => selection.modify('move', 'forward', 'sentence'), |
|
Xiaocheng
2016/10/26 09:31:04
Should be move forward by word twice.
yosin_UTC9
2016/10/26 09:40:39
No need to move twice to verify 'move-forward-sent
|
| + [ |
| + '<div contenteditable>', |
| + 'foo<img src="../../resources/abe.png">bar|', |
| + '</div>', |
| + ].join('')), |
| + 'Move forward word'); |
| + |
| +test(() => assert_selection( |
| + [ |
| + '<div contenteditable>', |
| + 'foo<img src="../../resources/abe.png">bar|', |
| + '</div>', |
| + ].join(''), |
| + selection => selection.modify('move', 'backward', 'sentence'), |
|
Xiaocheng
2016/10/26 09:31:04
Should be move backward by word twice.
yosin_UTC9
2016/10/26 09:40:38
No need to move twice to verify 'move-backward-sen
|
| + [ |
| + '<div contenteditable>', |
| + '|foo<img src="../../resources/abe.png">bar', |
| + '</div>', |
| + ].join('')), |
| + 'Move backward word'); |
| +</script> |