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

Unified Diff: third_party/WebKit/LayoutTests/editing/style/style_boundary.html

Issue 2717333003: Convert editing/style/style-boundary-005.html with assert_selection (Closed)
Patch Set: Created 3 years, 10 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/style/style_boundary.html
diff --git a/third_party/WebKit/LayoutTests/editing/style/style_boundary.html b/third_party/WebKit/LayoutTests/editing/style/style_boundary.html
index ec063ffb7464e119a264bcd09975ae23e0dbebc9..57ecf59e668ca0c576d3692ce7041cefb6949356 100644
--- a/third_party/WebKit/LayoutTests/editing/style/style_boundary.html
+++ b/third_party/WebKit/LayoutTests/editing/style/style_boundary.html
@@ -61,4 +61,25 @@
'</div>'
].join('')),
'B element should not spread beyond DIV');
+
+ test(() => {
+ assert_not_equals(window.internals, undefined,
+ 'This test requires clipboard access');
+
+ assert_selection(
+ [
+ '<div contenteditable>',
+ 'one two three<b>\u00A0four|</b>',
+ '</div>'
+ ].join(''),
+ selection => {
+ selection.setClipboardData('one');
+ selection.document.execCommand('paste');
+ },
+ [
+ '<div contenteditable>',
+ 'one two three<b>\u00A0four</b>one|',
+ '</div>'
+ ].join(''));
+ }, 'Pasting at style boundary does not crash or produce empty style span(s)');
</script>

Powered by Google App Engine
This is Rietveld 408576698