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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/the-textarea-element/cloning-steps.html

Issue 2341333002: Import wpt@1f2080f9ffa00ad27eb764b83fbc10960a95d6aa (Closed)
Patch Set: update win expectations Created 4 years, 3 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/imported/wpt/html/semantics/forms/the-textarea-element/cloning-steps.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/the-textarea-element/cloning-steps.html b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/the-textarea-element/cloning-steps.html
new file mode 100644
index 0000000000000000000000000000000000000000..160b70af994e6930a46e7843d9bb29030543385b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/the-textarea-element/cloning-steps.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Cloning of textarea elements</title>
+<link rel="help" href="https://dom.spec.whatwg.org/#dom-node-clonenode">
+<link rel="help" href="https://dom.spec.whatwg.org/#concept-node-clone">
+<link rel="help" href="https://dom.spec.whatwg.org/#concept-node-clone-ext">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/forms.html#the-textarea-element:concept-node-clone-ext">
+<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<script>
+"use strict";
+
+test(() => {
+ const textarea = document.createElement("textarea");
+ textarea.value = "foo bar";
+
+ const copy = textarea.cloneNode();
+ assert_equals(copy.value, "foo bar");
+}, "textarea element's value should be cloned");
+
+test(() => {
+ const textarea = document.createElement("textarea");
+ textarea.value = "foo bar";
+
+ const copy = textarea.cloneNode();
+ copy.setAttribute("value", "something else");
+
+ assert_equals(copy.value, "foo bar");
+}, "textarea element's dirty value flag should be cloned, so setAttribute doesn't affect the cloned textarea's value");
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698