4 https://bugzilla.mozilla.org/show_bug.cgi?id=567663
7 <title>Test for Bug
567663</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" href=
"/tests/SimpleTest/test.css"/>
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=567663">Mozilla Bug
567663</a>
14 <div id=
"content" style=
"display: none">
20 /** Test for Bug 567663 **/
21 var ps
= document
.getElementById("content").getElementsByTagName("p");
22 is(ps
[0].hidden
, false, "First p's IDL attribute was wrong.");
23 is(ps
[0].hasAttribute("hidden"), false, "First p had a content attribute.");
24 is(ps
[1].hidden
, true, "Second p's IDL attribute was wrong.");
25 is(ps
[1].hasAttribute("hidden"), true,
26 "Second p didn't have a content attribute.");
27 is(ps
[1].getAttribute("hidden"), "",
28 "Second p's content attribute was wrong.");
31 is(ps
[0].getAttribute("hidden"), "",
32 "Content attribute was set to an incorrect value.");
34 is(ps
[1].hasAttribute("hidden"), false,
35 "Second p still had a content attribute.");
37 ps
[0].setAttribute("hidden", "banana");
38 is(ps
[0].hidden
, true, "p's IDL attribute was wrong after setting.");
39 is(ps
[0].getAttribute("hidden"), "banana", "Content attribute changed.");
41 ps
[0].setAttribute("hidden", "false");
42 is(ps
[0].hidden
, true, "p's IDL attribute was wrong after setting.");
43 is(ps
[0].getAttribute("hidden"), "false", "Content attribute changed.");
45 ps
[0].removeAttribute("hidden");
46 is(ps
[0].hidden
, false,
47 "p's IDL attribute was wrong after removing the content attribute.");
48 is(ps
[0].hasAttribute("hidden"), false);