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

Unified Diff: LayoutTests/fast/forms/form-attribute.html

Issue 1204353004: Fix form association behavior when a form and a control with form= are removed from a document toge… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Don't add an assertion 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
« no previous file with comments | « no previous file | LayoutTests/fast/forms/form-attribute-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/form-attribute.html
diff --git a/LayoutTests/fast/forms/form-attribute.html b/LayoutTests/fast/forms/form-attribute.html
index 5bd9dc632bdc0c306a748e72be619a9840bf2cf7..362784737d21b849ed5ea7d3a472cee43228fcda 100644
--- a/LayoutTests/fast/forms/form-attribute.html
+++ b/LayoutTests/fast/forms/form-attribute.html
@@ -180,6 +180,14 @@ shouldBe('inputElement.form', 'owner');
shouldBe('labelElement.form', 'owner');
debug('');
+debug('- Check if a form and a control are disassociated when they are removed from the document together.');
+container.innerHTML = '<div><input form=owner><form id=owner></form></div>';
+owner = document.getElementById('owner');
+shouldBe('owner.elements.length', '1');
+container.firstChild.remove();
+shouldBe('owner.elements.length', '0');
+
+debug('');
debug('- Checks if option.form is only set if it has a &lt;select&gt; parent.');
container.innerHTML = '<form id=firstOwner><option id=firstOption></option></form>' +
'<form id=secondOwner><optgroup><option id=secondOption></option></optgroup></form>' +
@@ -191,6 +199,8 @@ shouldBe('option2.form', 'null');
owner = document.getElementById('thirdOwner');
var option3 = document.getElementById('thirdOption');
shouldBe('option3.form', 'owner');
+
+container.remove();
</script>
</body>
</html>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/form-attribute-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698