1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 https://bugzilla.mozilla.org/show_bug.cgi?id=339494
6 <title>Test for Bug
339494</title>
7 <script type=
"text/javascript" src=
"/MochiKit/packed.js"></script>
8 <script type=
"text/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=339494">Mozilla Bug
339494</a>
14 <div id=
"content" style=
"display: none">
19 <script class=
"testbody" type=
"text/javascript">
21 /** Test for Bug
339494 **/
23 var d = document.getElementById(
"d");
25 d.setAttribute(
"hhh",
"testvalue");
27 document.addEventListener(
"DOMAttrModified", removeItAgain, false);
28 d.removeAttribute(
"hhh");
29 document.removeEventListener(
"DOMAttrModified", removeItAgain, false);
31 function removeItAgain()
33 ok(!d.hasAttribute(
"hhh"),
"Value check 1",
34 "There should be no value");
35 isnot(d.getAttribute(
"hhh"),
"testvalue",
"Value check 2");
36 document.removeEventListener(
"DOMAttrModified", removeItAgain, false);
37 d.removeAttribute(
"hhh");
38 ok(true,
"Reachability",
"We shouldn't have crashed");
41 var s = document.getElementById(
"s");
43 s.setAttribute(
"ggg",
"testvalue");
45 document.addEventListener(
"DOMAttrModified", compareVal, false);
46 s.setAttribute(
"ggg",
"othervalue");
47 document.removeEventListener(
"DOMAttrModified", compareVal, false);
51 ok(s.hasAttribute(
"ggg"),
"Value check 3",
52 "There should be a value");
53 isnot(s.getAttribute(
"ggg"),
"testvalue",
"Value check 4");
54 is(s.getAttribute(
"ggg"),
"othervalue",
"Value check 5");