1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 https://bugzilla.mozilla.org/show_bug.cgi?id=300691
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" />
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=300691">Mozilla Bug
300691</a>
14 <div id=
"content" style=
"display: none">
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.
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">
31 /** Test for Bug
300691 **/
32 $(
"test2").appendChild(document.createCDATASection(
"test2Ran = true"));
33 is(test2Ran, false,
"Not yet 2!");
35 $(
"test3").appendChild(document.createCDATASection(
""));
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!");
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");