Added .form property for legend tag

This commit is contained in:
Adrian Utrilla 2016-04-03 18:25:40 +02:00
parent 88d29e537c
commit a8f9887d86
5 changed files with 73 additions and 24 deletions

View file

@ -5319,15 +5319,9 @@
[HTMLFieldSetElement interface: operation setCustomValidity(DOMString)]
expected: FAIL
[HTMLLegendElement interface: attribute form]
expected: FAIL
[HTMLLegendElement interface: attribute align]
expected: FAIL
[HTMLLegendElement interface: document.createElement("legend") must inherit property "form" with the proper type (0)]
expected: FAIL
[HTMLLegendElement interface: document.createElement("legend") must inherit property "align" with the proper type (1)]
expected: FAIL

View file

@ -1,5 +0,0 @@
[legend-form.html]
type: testharness
[Check if legend.form return null when legend has no fieldset element as its parent]
expected: FAIL

View file

@ -13,11 +13,21 @@
</form>
</div>
<div style="display:none">
<form id="testformWithFieldSet">
<fieldset>
<legend id="legendWithFieldSet">radio</legend>
</fieldset>
</form>
</div>
<script>
test(function () {
var legendEle = document.getElementById("legendWithFieldSet");
assert_not_equals(legendEle.form, null);
assert_equals(legendEle.form, document.getElementById("testformWithFieldSet"));
}, "Check if legend.form returns its parent when it's inside a fieldset");
test(function () {
var legendEle = document.getElementById("testlegend");
assert_equals(legendEle.form, null);
}, "Check if legend.form return null when legend has no fieldset element as its parent");
</script>