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> |