Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=500937
5 -->
6 <head>
7 <title>Test for Bug 500937</title>
8 <script type="application/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=500937">Mozilla Bug 500937</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
15 <iframe id=iframe src="about:blank"></iframe>
16 </div>
17 <pre id="test">
18 <script type="application/javascript">
20 /** Test for Bug 500937 **/
22 var d = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", null);
23 var h = d.documentElement;
24 h.appendChild(d.createElementNS("http://www.w3.org/1999/xhtml", "head"));
25 var b = d.createElementNS("http://www.w3.org/1999/xhtml", "body");
26 h.appendChild(b);
28 b.appendChild(d.createElementNS("http://www.w3.org/1999/xhtml", "div"));
29 b.appendChild(d.createElementNS("http://www.w3.org/1999/xhtml", "script"));
30 b.appendChild(d.createElementNS("http://www.w3.org/1999/xhtml", "br"));
31 b.appendChild(d.createElementNS("http://www.w3.org/1999/xhtml", "source"));
32 b.appendChild(d.createElementNS("http://www.w3.org/1999/xhtml", "param"));
33 b.appendChild(d.createTextNode("\u00A0"));
35 is(new XMLSerializer().serializeToString(d),
36 '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><div></div><script><\/script><br /><source /><param />\u00A0</body></html>',
37 "XML DOM input to XMLSerializer");
39 d = document.getElementById('iframe').contentWindow.document;
41 while(d.documentElement.previousSibling) {
42 d.removeChild(d.documentElement.previousSibling);
43 }
45 d.replaceChild(h, d.documentElement);
47 is(new XMLSerializer().serializeToString(d),
48 '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><div></div><script><\/script><br /><source /><param />\u00A0</body></html>',
49 "HTML DOM input to XMLSerializer");
51 </script>
52 </pre>
53 </body>
54 </html>