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

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

Issue 2684973005: Check if the next text node has a leading white space (Closed)
Patch Set: add test case Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype HTML> 1 <!doctype HTML>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script> 4 <script src="../assert_selection.js"></script>
5 <script> 5 <script>
6 test(() => assert_selection( 6 test(() => assert_selection(
7 '<div contenteditable><p>A|B</p></div>', 7 '<div contenteditable><p>A|B</p></div>',
8 'insertText \ ', 8 'insertText \ ',
9 '<div contenteditable><p>A |B</p></div>'), 9 '<div contenteditable><p>A |B</p></div>'),
10 'insert a plain space in the middle of text node'); 10 'insert a plain space in the middle of text node');
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 test(() => assert_selection( 51 test(() => assert_selection(
52 '<div contenteditable>|<br> </div>', 52 '<div contenteditable>|<br> </div>',
53 selection => { 53 selection => {
54 selection.document.execCommand('insertText', false, ' '); 54 selection.document.execCommand('insertText', false, ' ');
55 selection.document.execCommand('insertText', false, ' '); 55 selection.document.execCommand('insertText', false, ' ');
56 selection.document.execCommand('insertText', false, ' '); 56 selection.document.execCommand('insertText', false, ' ');
57 }, 57 },
58 '<div contenteditable>\u00A0 \u00A0| </div>'), 58 '<div contenteditable>\u00A0 \u00A0| </div>'),
59 'Insert spaces into the editable <div> that only has <br> and space as child') ; 59 'Insert spaces into the editable <div> that only has <br> and space as child') ;
60
61 test(() => assert_selection(
62 '<div contenteditable>|<br>\u000A</div>',
63 selection => {
64 selection.document.execCommand('insertText', false, ' ');
65 selection.document.execCommand('insertText', false, ' ');
66 selection.document.execCommand('insertText', false, ' ');
67 },
68 '<div contenteditable>\u00A0 \u00A0|\u000A</div>'),
69 'Insert spaces into the editable <div> that only has <br> and enter as child') ;
60 </script> 70 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698