Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(956)

Unified Diff: third_party/WebKit/LayoutTests/editing/inserting/insert-space.html

Issue 2451423003: Add a test case for bug 659109 (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 &nbsp; 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>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698