Skip media source tests since the feature is not enabled on Windows.
[WebKit-https.git] / LayoutTests / fast / forms / fieldset / fieldset-name.html
1 <script src="../../../resources/js-test-pre.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"');
8
9 debug('fs1.name="b"');
10 fs1.name = "b";
11 shouldBe('fs1.name', '"b"');
12 shouldBe('fs1.getAttribute("name")', '"b"');
13
14 debug('fs1.name=1234');
15 fs1.name = 1234;
16 shouldBe('fs1.name', '"1234"');
17 shouldBe('fs1.getAttribute("name")', '"1234"');
18
19 // FIXME: The specification doesn't have clear description for setting null to name.
20 // We may need to update below once the specification fixed.
21 debug('fs1.name=null');
22 fs1.name = null;
23 shouldBeEqualToString('fs1.name', 'null');
24 shouldBeEqualToString('fs1.getAttribute("name")', 'null');
25 shouldBeTrue('fs1.hasAttribute("name")');
26
27 debug('fs1.name=undefined');
28 fs1.name = undefined;
29 shouldBeEqualToString('fs1.name', 'undefined');
30 shouldBeEqualToString('fs1.getAttribute("name")', 'undefined');
31 shouldBeTrue('fs1.hasAttribute("name")');
32 </script>
33 <script src="../../../resources/js-test-post.js"></script>
34