4 https://bugzilla.mozilla.org/show_bug.cgi?id=338679
7 <title>Testcase bug
338679</title>
8 <script type=
"text/javascript" src=
"../MochiKit/MochiKit.js"></script>
9 <script type=
"text/javascript" src=
"SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"SimpleTest/test.css" />
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=338679">Mozilla Bug
338679</a>
16 <dt>Actual result:
</dt>
18 <pre id=
"out" style=
"width: 20em">
22 <dt>Expected result:
</dt>
26 Previous: width:
20em;
35 /* This is our event handler function */
36 function attr_modified(ev
) {
37 $("out").textContent
= "Previous:\t" + ev
.prevValue
+ "\nNew:\t\t" + ev
.newValue
;
38 is(ev
.newValue
, "width: auto;", "DOMAttrModified event reports correct newValue");
39 todo(ev
.prevValue
== "width: 20em;", "DOMAttrModified event reports correct prevValue");
40 SimpleTest
.finish(); // trigger the end of our test sequence
43 /* Call this to tell SimpleTest to wait for SimpleTest.finish() */
44 SimpleTest
.waitForExplicitFinish();
46 $("out").addEventListener("DOMAttrModified", attr_modified
, false);
47 $("out").style
.width
= "auto";
49 /* End of script, but SimpleTest will keep listening because
50 we called waitForExplicitFinish() */