| Index: third_party/WebKit/LayoutTests/editing/pasteboard/copy_ending_at_end_of_block.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/copy_ending_at_end_of_block.html b/third_party/WebKit/LayoutTests/editing/pasteboard/copy_ending_at_end_of_block.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..aea4f02d56755714da36059ecdbf39cb60d91f18
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/editing/pasteboard/copy_ending_at_end_of_block.html
|
| @@ -0,0 +1,31 @@
|
| +<!doctype html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| +<script>
|
| + test(() => {
|
| + if (!window.testRunner) {
|
| + assert_unreached('This test requires testRunner for copy/paste.');
|
| + return;
|
| + }
|
| + assert_selection(
|
| + [
|
| + '<div contenteditable>',
|
| + '<div><div>foo</div>^bar</div>baz|',
|
| + '</div>',
|
| + '<div contenteditable id="sample">abc</div>',
|
| + ].join(''),
|
| + selection => {
|
| + selection.document.execCommand('copy');
|
| + const sample = selection.document.getElementById('sample');
|
| + selection.collapse(sample.firstChild, 3);
|
| + selection.document.execCommand('paste');
|
| + },
|
| + [
|
| + '<div contenteditable>',
|
| + '<div><div>foo</div>bar</div>baz',
|
| + '</div>',
|
| + '<div contenteditable id="sample">abcbar<br>baz|</div>',
|
| + ].join(''));
|
| + }, 'Copy selection ending at end of a block');
|
| +</script>
|
|
|