| Index: third_party/WebKit/LayoutTests/editing/assert_selection.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/assert_selection.html b/third_party/WebKit/LayoutTests/editing/assert_selection.html
|
| index 17a95e1f350faf849bcb41eb07eb4e793c2daefd..1c8d75737d93fd3ba4a4dceac946a7836e662384 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/assert_selection.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/assert_selection.html
|
| @@ -345,4 +345,27 @@ test(() => {
|
| assert_equals(internals.textAffinity, 'Upstream'); },
|
| '<div contenteditable style="width: 25px;">foo|bar</div>');
|
| }, 'Textaffinity');
|
| +
|
| +test(() => {
|
| + assert_exists(window, 'eventSender');
|
| + assert_selection(
|
| + [
|
| + '<div id="first">one <span id="start"></span>two three</div>',
|
| + '<div id="second">four <span id="end"></span>five six</div>',
|
| + ].join(''),
|
| + selection => {
|
| + const start = selection.document.getElementById('start');
|
| + const end = selection.document.getElementById('end');
|
| + eventSender.mouseMoveTo(selection.computeLeft(start),
|
| + selection.computeTop(start));
|
| + eventSender.mouseDown();
|
| + eventSender.mouseMoveTo(selection.computeLeft(end),
|
| + selection.computeTop(end));
|
| + eventSender.mouseUp();
|
| + },
|
| + [
|
| + '<div id="first">one <span id="start"></span>^two three</div>',
|
| + '<div id="second">four |<span id="end"></span>five six</div>',
|
| + ].join(''));
|
| +}, 'computeLeft() and computeTop()');
|
| </script>
|
|
|