2009-12-21 22:51:50 +01:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<script>
|
|
|
|
function ok(b,m) {
|
|
|
|
return external.ok(b, m);
|
|
|
|
}
|
|
|
|
|
2010-03-24 20:01:19 +01:00
|
|
|
function test_removeAttribute(e) {
|
|
|
|
ok(e.removeAttribute('nonexisting') === false, "removeAttribute('nonexisting') didn't return false");
|
|
|
|
|
|
|
|
e.title = "title";
|
|
|
|
ok(e.removeAttribute('title') === true, "removeAttribute('title') didn't return true");
|
|
|
|
ok(e.title === "", "e.title = " + e.title);
|
|
|
|
ok(("title" in e) === true, "title is not in e");
|
|
|
|
|
|
|
|
e["myattr"] = "test";
|
|
|
|
ok(e.removeAttribute('myattr') === true, "removeAttribute('myattr') didn't return true");
|
|
|
|
ok(e["myattr"] === undefined, "e['myattr'] = " + e['myattr']);
|
|
|
|
ok(("myattr" in e) === false, "myattr is in e");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2009-12-21 22:51:50 +01:00
|
|
|
function runTest() {
|
|
|
|
obj = new Object();
|
|
|
|
ok(obj === window.obj, "obj !== window.obj");
|
|
|
|
|
|
|
|
ok(typeof(divid) === "object", "typeof(divid) = " + typeof(divid));
|
|
|
|
|
2010-03-24 20:01:19 +01:00
|
|
|
test_removeAttribute(document.getElementById("divid"));
|
|
|
|
test_removeAttribute(document.body);
|
|
|
|
|
2009-12-21 22:51:50 +01:00
|
|
|
external.reportSuccess();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<body onload="runTest();">
|
|
|
|
<div id="divid"></div>
|
|
|
|
</body>
|
|
|
|
</html>
|