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

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

Issue 2175163004: Add a plain space instead of   between text nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix a test fail in Win Created 4 years, 4 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
OLDNEW
(Empty)
1 <!doctype HTML>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script>
5 <script>
6 test(() => assert_selection(
7 '<div contenteditable><p>A|B</p></div>',
8 'insertText \ ',
9 '<div contenteditable><p>A |B</p></div>'),
10 'insert a plain space in the middle of text node');
11
12 test(() => assert_selection(
13 '<div contenteditable><p id="para"></p></div>',
14 selection => {
15 var para = selection.document.getElementById('para');
16 para.appendChild(selection.document.createTextNode('A'));
17 para.appendChild(selection.document.createTextNode('B'));
18 selection.collapse(para.firstChild, 1);
19
20 selection.document.execCommand('insertText', false, ' ');
21 },
22 '<div contenteditable><p id="para">A |B</p></div>'),
23 'insert a plain space between two inserted text nodes');
24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698