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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy-test.html

Issue 2320023003: [WIP] compare test cases (Closed)
Patch Set: compare test cases Created 4 years, 3 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 style="width: 2em;"><b><i>foo</i></b> bar</div><div contenteditable>|</d iv>',
8 selection => {
9 selection.setClipboardData('<b><i>foo</i></b> bar');
10 selection.document.execCommand('paste');
11 },
12 '<div style="width: 2em;"><b><i>foo</i></b> bar</div><div contenteditable><b>< i>foo</i></b> bar|</div>'),
13 '1. Restore the collapsed leading space');
14
15 test(() => assert_selection(
16 '<div style="width: 2em;">^<b><i>foo</i></b> bar|</div><div contenteditable id ="editor"></div>',
17 selection => {
18 var copy = selection.document.getElementById('copy');
19 var editor = selection.document.getElementById('editor');
20
21 selection.document.execCommand('copy');
22 selection.collapse(editor);
23 selection.document.execCommand('paste');
24 },
25 '<div style="width: 2em;"><b><i>foo</i></b> bar</div><div contenteditable id=" editor"><b><i>foo</i></b>\u00A0bar|</div>'),
26 '2. Restore the collapsed leading space');
27 </script>
OLDNEW
« 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