Bug 449371 Firefox/Thunderbird crashes at exit [@ gdk_display_x11_finalize], p=Brian...
[wine-gecko.git] / testing / mochitest / tests / test_bug339350.xhtml
blobe856e45e918898fbaf0ddb52c33847ac338dad4a
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <!--
3 Tests by Sam Ruby - WTFPL License (http://sam.zoy.org/wtfpl/)
5 http://www.intertwingly.net/blog/2006/10/03/Firefox-XHTML-innerHTML-quirk#comments
6 https://bugzilla.mozilla.org/show_bug.cgi?id=339350
7 -->
8 <head>
9 <!-- XHTML needs the packed version -->
10 <script type="text/javascript" src="../MochiKit/packed.js"/>
11 <script type="text/javascript" src="SimpleTest/SimpleTest.js"/>
12 <link rel="stylesheet" type="text/css" href="SimpleTest/test.css" />
13 </head>
14 <body>
15 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=339350">Mozilla Bug 339350</a>
16 <div style="display: none">
17 <table border="1" cellspacing="0">
18 <thead>
19 <th></th>
20 <th>plain</th>
21 <th>brackets</th>
22 <th>braces</th>
23 </thead>
25 <tr>
26 <th>innerHTML</th>
27 <td><div id="i1"/></td>
28 <td style="background:yellow"><div id="i2"/></td>
29 <td><div id="i3"/></td>
30 </tr>
31 <tr>
32 <th>textNode</th>
33 <td><div id="t1"/></td>
34 <td><div id="t2"/></td>
35 <td><div id="t3"/></td>
36 </tr>
37 </table>
38 </div>
39 <pre id="test">
40 <script type="text/javascript">
41 var text1 = 'foo bar';
42 var text2 = 'foo [bar]';
43 var text3 = 'foo {bar}';
45 <!-- This is the long way to write this stuff,
46 you can use MochiKit functions too -->
47 document.getElementById('i1').innerHTML = text1;
48 document.getElementById('i2').innerHTML = text2;
49 document.getElementById('i3').innerHTML = text3;
51 document.getElementById('t1').appendChild(document.createTextNode(text1));
52 document.getElementById('t2').appendChild(document.createTextNode(text2));
53 document.getElementById('t3').appendChild(document.createTextNode(text3));
55 <!-- The is() function is one way to add a test -->
56 is(document.getElementById('i2').innerHTML, text2, "XHTML innerHTML with trailing brackets ']]'");
58 </script>
59 </pre>
60 </body>
61 </html>