5 return external
.ok(b
, m
);
8 function test_removeAttribute(e
) {
9 ok(e
.removeAttribute('nonexisting') === false, "removeAttribute('nonexisting') didn't return false");
12 ok(e
.removeAttribute('title') === true, "removeAttribute('title') didn't return true");
13 ok(e
.title
=== "", "e.title = " + e
.title
);
14 ok(("title" in e
) === true, "title is not in e");
17 ok(e
.removeAttribute('myattr') === true, "removeAttribute('myattr') didn't return true");
18 ok(e
["myattr"] === undefined, "e['myattr'] = " + e
['myattr']);
19 ok(("myattr" in e
) === false, "myattr is in e");
23 function test_select_index() {
24 var s
= document
.getElementById("sel");
26 ok("0" in s
, "'0' is not in s");
27 ok(s
[0].text
=== "opt1", "s[0].text = " + s
[0].text
);
28 ok("1" in s
, "'1 is not in s");
29 ok(s
[1].text
=== "opt2", "s[1].text = " + s
[1].text
);
30 ok("2" in s
, "'2' is in s");
31 ok(s
[2] === null, "s[2] = " + s
[2]);
36 ok(obj
=== window
.obj
, "obj !== window.obj");
38 ok(typeof(divid
) === "object", "typeof(divid) = " + typeof(divid
));
40 test_removeAttribute(document
.getElementById("divid"));
41 test_removeAttribute(document
.body
);
44 external
.reportSuccess();
47 <body onload=
"runTest();">
48 <div id=
"divid"></div>