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

Unified Diff: LayoutTests/editing/pasteboard/copy-text-with-wrapped-tag.html

Issue 165083002: Issue 318925: Copy and paste sometimes removes spaces between words (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Issue 318925: Copy and paste sometimes removes spaces between words Created 6 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
« no previous file with comments | « no previous file | LayoutTests/editing/pasteboard/copy-text-with-wrapped-tag-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/pasteboard/copy-text-with-wrapped-tag.html
diff --git a/LayoutTests/editing/pasteboard/copy-text-with-wrapped-tag.html b/LayoutTests/editing/pasteboard/copy-text-with-wrapped-tag.html
new file mode 100644
index 0000000000000000000000000000000000000000..cdba071335fe0830237e54b5edcd7cb77e2d4efa
--- /dev/null
+++ b/LayoutTests/editing/pasteboard/copy-text-with-wrapped-tag.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div id="description">This tests to make sure that copying and pasting a text followed by an anchor tag wrapped into 2nd line do not lose the space between text and tag in the destination.</div>
+<div id="copy" style="width: 10em; border: thin solid green;">Copy this text <a href="http://www.google.com">AVeryLongWordThatWillWrap</a></div>
+<div id="paste" contentEditable="true" style="border: thin solid blue;"></div>
+
+<script src="../../resources/dump-as-markup.js"></script>
+<script>
+
+Markup.description(document.getElementById('description').textContent);
+Markup.dump('copy', 'Original');
+
+copy = document.getElementById("copy");
+window.getSelection().setBaseAndExtent(copy, 0, copy, copy.childNodes.length);
+document.execCommand("Copy");
+
+if (window.testRunner) {
+ paste = document.getElementById("paste");
+ window.getSelection().setPosition(paste, 0);
+ document.execCommand("Paste");
+
+ Markup.dump('paste', 'Pasted');
+}
+
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/editing/pasteboard/copy-text-with-wrapped-tag-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698