b=450088 backing out (new reftest failed)
[wine-gecko.git] / testing / mochitest / tests / test_bug691.html
blob064608695b7177a8834a5a17b433fe8b68f63cfa
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=691
5 -->
6 <head>
7 <title>Test for Bug 691</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 <script type="text/javascript">
13 function show(what) {
14 var stage = document.getElementById("stage");
15 if (what == "modularity") {
16 var spaghetti = document.createElement("IMG",null);
17 spaghetti.setAttribute("SRC","/static/nnc_lockup.gif");
18 spaghetti.setAttribute("id","foo");
19 stage.insertBefore(spaghetti,stage.firstChild);
23 function remove() {
24 var stage = document.getElementById("stage");
25 var body = document.getElementsByTagName("BODY")[0];
26 while (stage.firstChild) {
27 stage.removeChild(stage.firstChild);
31 </script>
32 </head>
33 <body>
34 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=691">Mozilla Bug 691</a>
35 <p id="display"></p>
36 <div id="content" >
37 <ul>
38 <li >foo</li>
39 </ul>
40 <div id="stage">
41 </div>
43 </div>
44 <pre id="test">
45 <script class="testbody" type="text/javascript">
47 /** Test for Bug 691 **/
49 show("modularity");
50 remove();
51 show("modularity");
52 remove();
53 show("modularity");
54 remove();
55 show("modularity");
57 ok($("foo"), "basic DOM manipulation doesn't crash");
59 </script>
60 </pre>
61 </body>
62 </html>