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

Unified Diff: third_party/WebKit/LayoutTests/editing/pasteboard/copy_ending_at_end_of_block.html

Issue 2752593006: Utilize assert_selection() in editing/pasteboard/4242293-1.html (Closed)
Patch Set: 2017-03-16T19:19:34 Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/pasteboard/4242293-1.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/pasteboard/copy_ending_at_end_of_block.html
diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/copy_ending_at_end_of_block.html b/third_party/WebKit/LayoutTests/editing/pasteboard/copy_ending_at_end_of_block.html
new file mode 100644
index 0000000000000000000000000000000000000000..aea4f02d56755714da36059ecdbf39cb60d91f18
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/pasteboard/copy_ending_at_end_of_block.html
@@ -0,0 +1,31 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<script>
+ test(() => {
+ if (!window.testRunner) {
+ assert_unreached('This test requires testRunner for copy/paste.');
+ return;
+ }
+ assert_selection(
+ [
+ '<div contenteditable>',
+ '<div><div>foo</div>^bar</div>baz|',
+ '</div>',
+ '<div contenteditable id="sample">abc</div>',
+ ].join(''),
+ selection => {
+ selection.document.execCommand('copy');
+ const sample = selection.document.getElementById('sample');
+ selection.collapse(sample.firstChild, 3);
+ selection.document.execCommand('paste');
+ },
+ [
+ '<div contenteditable>',
+ '<div><div>foo</div>bar</div>baz',
+ '</div>',
+ '<div contenteditable id="sample">abcbar<br>baz|</div>',
+ ].join(''));
+ }, 'Copy selection ending at end of a block');
+</script>
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/pasteboard/4242293-1.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698