Bug 1477552 [wpt PR 12124] - Add a test for Gecko bug 1472169., a=testonly

Automatic update from web-platform-testsAdd a test for Gecko bug 1472169. (#12124)

It's not clear that we want the fix over there given the performance
implications, but landing the test is still worth it.
--

wpt-commits: 3f9178031eec5374c9a7d5709a7e11ba4a1955ed
wpt-pr: 12124
This commit is contained in:
Emilio Cobos Álvarez 2018-07-25 18:42:54 +00:00 committed by James Graham
parent 3695caf407
commit 83d93ef2e2
2 changed files with 37 additions and 0 deletions

View File

@ -347935,6 +347935,12 @@
{}
]
],
"html/semantics/forms/the-textarea-element/textarea-validity-clone.html": [
[
"/html/semantics/forms/the-textarea-element/textarea-validity-clone.html",
{}
]
],
"html/semantics/forms/the-textarea-element/value-defaultValue-textContent-xhtml.xhtml": [
[
"/html/semantics/forms/the-textarea-element/value-defaultValue-textContent-xhtml.xhtml",
@ -587300,6 +587306,10 @@
"81a270bc3c9304f8b2e7dd526519f4eab7d94f45",
"testharness"
],
"html/semantics/forms/the-textarea-element/textarea-validity-clone.html": [
"d0334cee779937e5d800e478013e5c8ffeaa6a1c",
"testharness"
],
"html/semantics/forms/the-textarea-element/value-defaultValue-textContent-xhtml.xhtml": [
"03ce5d00e9887037bbd96f2d49e116c6b3329802",
"testharness"

View File

@ -0,0 +1,27 @@
<!doctype html>
<meta charset="utf-8">
<title>HTML Test: &lt;textarea&gt; validity state is correct after a clone</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-textarea-element">
<link rel="help" href="https://bugzil.la/1472169">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function() {
let form = document.createElement("form");
let textarea = document.createElement("textarea");
textarea.required = true;
textarea.appendChild(document.createTextNode("A"));
form.appendChild(textarea);
assert_true(textarea.validity.valid);
let formClone = form.cloneNode(true);
assert_equals(
formClone.querySelector('textarea').validity.valid,
textarea.validity.valid,
"Validity state should be preserved after a clone"
);
}, "<textarea> validity state should be preserved after a clone");
</script>