Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / fieldset / fieldset-name.html
blobd7b30bb88625dc9f309af088de361625810051ec
1 <script src="../../../resources/js-test.js"></script>
2 <fieldset id="fs1" name="a"></fieldset>
3 <script>
4 description("This test checks fieldset.name attribute.");
5 debug("Read from HTML");
6 shouldBe('fs1.name', '"a"');
7 shouldBe('fs1.getAttribute("name")', '"a"');
9 debug('fs1.name="b"');
10 fs1.name = "b";
11 shouldBe('fs1.name', '"b"');
12 shouldBe('fs1.getAttribute("name")', '"b"');
14 debug('fs1.name=1234');
15 fs1.name = 1234;
16 shouldBe('fs1.name', '"1234"');
17 shouldBe('fs1.getAttribute("name")', '"1234"');
19 debug('fs1.name=null');
20 fs1.name = null;
21 shouldBe('fs1.name', '"null"');
22 shouldBe('fs1.getAttribute("name")', '"null"');
23 shouldBeTrue('fs1.hasAttribute("name")');
25 debug('fs1.name=undefined');
26 fs1.name = undefined;
27 shouldBe('fs1.name', '"undefined"');
28 shouldBe('fs1.getAttribute("name")', '"undefined"');
29 shouldBeTrue('fs1.hasAttribute("name")');
30 </script>