Chromium Code Reviews| 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 |
| index f48cd44b7aba646402334cf283cafd2a74dbb39c..10c9f072b19a8cd43e3e8a865aeb3cae51cc72f7 100644 |
| --- a/third_party/WebKit/LayoutTests/editing/inserting/insert-space.html |
| +++ b/third_party/WebKit/LayoutTests/editing/inserting/insert-space.html |
| @@ -47,4 +47,16 @@ test(() => assert_selection( |
| }, |
| '<div contenteditable><p id="para">A\u00A0| B</p></div>'), |
| 'Insert a instead of plain space when it is inserted before the text node that has a leading plain space'); |
| + |
| +test(() => assert_selection( |
| + '<div contenteditable id="editor"><br> </div>', |
| + selection => { |
| + var editor = selection.document.getElementById('editor'); |
|
yosin_UTC9
2016/10/28 06:13:50
We don't need to have id="editor", you can write a
joone
2016/10/28 18:20:16
Done.
|
| + selection.collapse(editor.firstChild, 0); |
| + selection.document.execCommand('insertText', false, ' '); |
| + selection.document.execCommand('insertText', false, ' '); |
| + selection.document.execCommand('insertText', false, ' '); |
| + }, |
| + '<div contenteditable id="editor">\u00A0 \u00A0| </div>'), |
| + 'Insert spaces into the editable <div> that only has <br> and space as child'); |
| </script> |