b=450088 backing out (new reftest failed)
[wine-gecko.git] / testing / mochitest / tests / test_bug367164.html
blobdaa074dc420bfb5d9a7b7106240f2344701a198f
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=367164
5 -->
6 <head>
7 <title>Test for Bug 367164</title>
8 <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
9 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=367164">Mozilla Bug 367164</a>
14 <p id="display"></p>
15 <div id="content" style="display: none">
17 </div>
18 <pre id="test">
19 <script class="testbody" type="text/javascript">
21 /** Test for Bug 367164 **/
23 var span = document.createElement("span");
25 var ins1 = false;
26 var ins2 = false;
27 var rem1 = false;
28 var rem2 = false;
30 span.addEventListener("DOMNodeInserted", function() { ins1 = true; }, true);
31 span.addEventListener("DOMNodeInserted", function() { ins2 = true; }, false);
32 span.addEventListener("DOMNodeRemoved", function() { rem1 = true; }, true);
33 span.addEventListener("DOMNodeRemoved", function() { rem2 = true; }, false);
35 $("content").appendChild(span);
36 $("content").removeChild(span);
38 is(ins1, true, "Capturing DOMNodeInserted listener");
39 is(ins2, true, "Bubbling DOMNodeInserted listener");
40 is(rem1, true, "Capturing DOMNodeRemoved listener");
41 is(rem2, true, "Bubbling DOMNodeRemoved listener");
43 </script>
45 </pre>
46 </body>
47 </html>