| <script src="../../../resources/js-test-pre.js"></script> |
| <fieldset id="fs1" name="a"></fieldset> |
| description("This test checks fieldset.name attribute."); |
| shouldBe('fs1.name', '"a"'); |
| shouldBe('fs1.getAttribute("name")', '"a"'); |
| shouldBe('fs1.name', '"b"'); |
| shouldBe('fs1.getAttribute("name")', '"b"'); |
| shouldBe('fs1.name', '"1234"'); |
| shouldBe('fs1.getAttribute("name")', '"1234"'); |
| // FIXME: The specification doesn't have clear description for setting null to name. |
| // We may need to update below once the specification fixed. |
| shouldBeEqualToString('fs1.name', 'null'); |
| shouldBeEqualToString('fs1.getAttribute("name")', 'null'); |
| shouldBeTrue('fs1.hasAttribute("name")'); |
| debug('fs1.name=undefined'); |
| shouldBeEqualToString('fs1.name', 'undefined'); |
| shouldBeEqualToString('fs1.getAttribute("name")', 'undefined'); |
| shouldBeTrue('fs1.hasAttribute("name")'); |
| <script src="../../../resources/js-test-post.js"></script> |