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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/pasteboard/preserve-trailing-space.html

Issue 2320533002: Restore a collapsed leading space of text used for line break (Closed)
Patch Set: Refactoring 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 | third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html » ('j') | 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: 10em;">Copy this area <a href="http://foo/">AVeryLongWordT hatWillWrap</a></div><div contenteditable>|</div>',
8 selection => {
9 selection.setClipboardData('Copy this area <a href="http://foo/">AVeryLongWo rdThatWillWrap</a>');
10 selection.document.execCommand('paste');
11 },
12 '<div style="width: 10em;">Copy this area <a href="http://foo/">AVeryLongWordT hatWillWrap</a></div><div contenteditable>Copy this area <a href="http://foo/">A VeryLongWordThatWillWrap|</a></div>'),
13 '1. Restore the collapsed space');
14
15 test(() => assert_selection(
16 '<div style="width: 2em;"><b><i>foo </i></b>bar</div><div contenteditable>|</d iv>',
17 selection => {
18 selection.setClipboardData('<b><i>foo </i></b>bar');
19 selection.document.execCommand('paste');
20 },
21 '<div style="width: 2em;"><b><i>foo </i></b>bar</div><div contenteditable><b><i >foo </i></b>bar|</div>'),
22 '2. Restore the collapsed space');
23
24 test(() => assert_selection(
25 '<div style="width: 2em;">작은홍띠점박이푸른부전나비</div><div contenteditable>|</div>',
26 selection => {
27 selection.setClipboardData('작은홍띠점박이푸른부전나비');
28 selection.document.execCommand('paste');
29 },
30 '<div style="width: 2em;">작은홍띠점박이푸른부전나비</div><div contenteditable>작은홍띠점박이푸른부전나비 |</div>'),
31 '3. Space should not be added for CJK');
32
33 test(() => assert_selection(
34 '<div style="width: 2em; word-break: break-all">Pneumonoultramicroscopicsilico volcanoconiosis</div><div contenteditable>|</div>',
35 selection => {
36 selection.setClipboardData('Pneumonoultramicroscopicsilicovolcanoconiosis');
37 selection.document.execCommand('paste');
38 },
39 '<div style="width: 2em; word-break: break-all">Pneumonoultramicroscopicsilicov olcanoconiosis</div><div contenteditable>Pneumonoultramicroscopicsilicovolcanoco niosis|</div>'),
40 '4. Space should not be added for CSS word-break: break-all');
41 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698