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

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

Issue 2325553002: Restore a collapsed leading space of text used for line break (Closed)
Patch Set: Make FindInPageControllerTest.SpanAndListsSearchable pass 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html
diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html b/third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html
index a7ba4ce9455aeaff34ce9e11cbfad776aaff883f..94aa3309c6ea1fb227b4506d36060ad20f242ea2 100644
--- a/third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html
+++ b/third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html
@@ -31,13 +31,26 @@ test(() => assert_selection(
'3. Restore the collapsed leading space');
test(() => assert_selection(
+ '<div style="width: 2em;"><b><i>^foo</i></b> bar|</div><div contenteditable id="editor"></div>',
+ selection => {
+ var copy = selection.document.getElementById('copy');
+ var editor = selection.document.getElementById('editor');
+
+ selection.document.execCommand('copy');
yosin_UTC9 2016/09/12 04:09:10 We can use internals.selectedTextForClipboard() to
joone 2016/09/12 21:33:02 html = <b style="color: rgb(0, 0, 0); font-family:
yosin_UTC9 2016/09/13 02:00:30 Since StyledMarkupAccumulator::renderedText() call
joone 2016/09/14 04:04:35 Done.
+ selection.collapse(editor);
+ selection.document.execCommand('paste');
+ },
+ '<div style="width: 2em;"><b><i>foo</i></b> bar</div><div contenteditable id="editor"><b><i>foo</i></b>\u00A0bar|</div>'),
+ '4. Restore the collapsed leading space');
+
+test(() => assert_selection(
'<div style="width: 2em;">작은홍띠점박이푸른부전나비</div><div contenteditable>|</div>',
selection => {
selection.setClipboardData('작은홍띠점박이푸른부전나비');
selection.document.execCommand('paste');
},
'<div style="width: 2em;">작은홍띠점박이푸른부전나비</div><div contenteditable>작은홍띠점박이푸른부전나비|</div>'),
- '4. Space should not be added for CJK');
+ '5. Space should not be added for CJK');
test(() => assert_selection(
'<div style="width: 2em; word-break: break-all">Pneumonoultramicroscopicsilicovolcanoconiosis</div><div contenteditable>|</div>',
@@ -46,5 +59,5 @@ test(() => assert_selection(
selection.document.execCommand('paste');
},
'<div style="width: 2em; word-break: break-all">Pneumonoultramicroscopicsilicovolcanoconiosis</div><div contenteditable>Pneumonoultramicroscopicsilicovolcanoconiosis|</div>'),
- '5. Space should not be added for CSS word-break: break-all');
+ '6. Space should not be added for CSS word-break: break-all');
</script>

Powered by Google App Engine
This is Rietveld 408576698