b=450088 backing out (new reftest failed)
[wine-gecko.git] / testing / mochitest / tests / test_bug300691-3.xhtml
blobdf20ff992d87f73c7c8165945eb6762bc4f73c07
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <!--
3 https://bugzilla.mozilla.org/show_bug.cgi?id=300691
4 -->
5 <head>
6 <title>Test for Bug 300691</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" />
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=300691">Mozilla Bug 300691</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
16 </div>
17 <pre id="test">
18 <script type="text/javascript">
19 // First, setup. We'll be toggling these variables as we go.
20 // Note that scripts don't execute immediately when you put text in them --
21 // they wait for the currently-running script to finish.
22 var test1Ran = false;
23 var test2Ran = false;
24 var test3Ran = false;
25 </script>
26 <script id="test1" type="text/javascript">test1Ran = true;</script>
27 <script id="test2" type="text/javascript"></script>
28 <script id="test3" type="text/javascript"></script>
29 <script class="testbody" type="text/javascript">
30 <![CDATA[
31 /** Test for Bug 300691 **/
32 $("test2").appendChild(document.createCDATASection("test2Ran = true"));
33 is(test2Ran, false, "Not yet 2!");
35 $("test3").appendChild(document.createCDATASection(""));
36 ]]>
37 </script>
38 <script type="text/javascript">
39 // Follow up on some of those
40 $("test3").firstChild.data = "test3Ran = true";
41 is(test3Ran, false, "Not yet 3!");
42 </script>
43 <script type="text/javascript">
44 is(test1Ran, true, "Should have run!");
45 is(test2Ran, true, "Should execute empty script on child append");
46 is(test3Ran, true, "Should execute empty script if child gets some text");
47 </script>
48 </pre>
49 </body>
50 </html>