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

Unified Diff: LayoutTests/fast/forms/textarea-cloned-text-match.html

Issue 1134593004: Reapply the patch r191685 with fixing the regression issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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: LayoutTests/fast/forms/textarea-cloned-text-match.html
diff --git a/LayoutTests/fast/forms/textarea-cloned-text-match.html b/LayoutTests/fast/forms/textarea-cloned-text-match.html
new file mode 100644
index 0000000000000000000000000000000000000000..ee0555a89722ce5ba51a7f08b553a7a672558007
--- /dev/null
+++ b/LayoutTests/fast/forms/textarea-cloned-text-match.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>Testing cloneNode(true) on textarea element works correctly</p>
+<p>Before clone</p>
+<textarea name="" id="textarea1" cols="15" rows="2">InitialText</textarea>
+<textarea name="" id="textarea2" cols="15" rows="2">InitialText</textarea>
+<textarea name="" id="textarea3" cols="15" rows="2">InitialText</textarea>
+<p>After clone</p>
+<script>
+// cloning text
+var textarea1 = document.getElementById('textarea1');
+document.body.appendChild(textarea1.cloneNode(true));
+
+// User input
+var textarea2 = document.getElementById('textarea2');
+textarea2.focus();
+document.execCommand('InsertText', false, 'InsertedText ');
+document.body.appendChild(textarea2.cloneNode(true));
+textarea2.blur();
+
+// Updating IDL value
+var textarea3 = document.getElementById('textarea3');
+textarea3.value = "NewText";
+document.body.appendChild(textarea3.cloneNode(true));
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698