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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/pasteboard/copy-paste-underlined.html

Issue 2626933002: Make Editor::appliedEditing update layout before changing selection (Closed)
Patch Set: Rebased Created 3 years, 11 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/Editor.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(() => { 6 test(() => {
7 assert_not_equals( 7 assert_not_equals(
8 window.testRunner, undefined, 8 window.testRunner, undefined,
9 'This test requires testRunner.'); 9 'This test requires testRunner.');
10 10
11 assert_selection( 11 assert_selection(
12 [ 12 [
13 '<div contenteditable>^foo bar baz.|</div>', 13 '<div contenteditable>^foo bar baz.|</div>',
14 '<div contenteditable id="paste"><br></div>' 14 '<div contenteditable id="paste"><br></div>'
15 ].join(''), 15 ].join(''),
16 selection => { 16 selection => {
17 const document = selection.document; 17 const document = selection.document;
18 document.execCommand('underline'); 18 document.execCommand('underline');
19 document.execCommand('copy'); 19 document.execCommand('copy');
20 document.getElementById('paste').focus(); 20 document.getElementById('paste').focus();
21 document.execCommand('paste'); 21 document.execCommand('paste');
22 }, 22 },
23 [ 23 [
24 '<div contenteditable><u>foo bar baz.</u></div>', 24 '<div contenteditable><u>foo bar baz.</u></div>',
25 '<div contenteditable id="paste"><u>foo bar baz.|</u></div>' 25 '<div contenteditable id="paste"><u>foo bar baz.|</u></div>'
26 ].join('')); 26 ].join(''));
27 }, 'Copy/paste underlined text.'); 27 }, 'Copy/paste underlined text.');
28
29 test(() => {
30 assert_not_equals(
31 window.testRunner, undefined,
32 'This test requires testRunner.');
33
34 assert_selection(
35 [
36 '<div contenteditable spellcheck="false">^foo bar baz.|</div>',
37 '<div contenteditable id="paste"><br></div>'
38 ].join(''),
39 selection => {
40 const document = selection.document;
41 document.execCommand('underline');
42 document.execCommand('copy');
43 document.getElementById('paste').focus();
44 document.execCommand('paste');
45 },
46 [
47 '<div contenteditable spellcheck="false"><u>foo bar baz.</u></div>',
48 '<div contenteditable id="paste"><u>foo bar baz.|</u></div>'
49 ].join(''));
50 }, 'Copy/paste underlined text with spell checker off.');
28 </script> 51 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698