| Index: third_party/WebKit/LayoutTests/editing/inserting/insert-space.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert-space.html b/third_party/WebKit/LayoutTests/editing/inserting/insert-space.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5edee77eb90a06b862dc009c889bf46fe45b9c4c
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/editing/inserting/insert-space.html
|
| @@ -0,0 +1,24 @@
|
| +<!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><p>A|B</p></div>',
|
| + 'insertText \ ',
|
| + '<div contenteditable><p>A |B</p></div>'),
|
| + 'insert a plain space in the middle of text node');
|
| +
|
| +test(() => assert_selection(
|
| + '<div contenteditable><p id="para"></p></div>',
|
| + selection => {
|
| + var para = selection.document.getElementById('para');
|
| + para.appendChild(selection.document.createTextNode('A'));
|
| + para.appendChild(selection.document.createTextNode('B'));
|
| + selection.collapse(para.firstChild, 1);
|
| +
|
| + selection.document.execCommand('insertText', false, ' ');
|
| + },
|
| + '<div contenteditable><p id="para">A |B</p></div>'),
|
| + 'insert a plain space between two inserted text nodes');
|
| +</script>
|
|
|