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.)
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=562652 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Test for Bug 562652</title> |
michael@0 | 8 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 9 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 10 | </head> |
michael@0 | 11 | <body> |
michael@0 | 12 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=562652">Mozilla Bug 562652</a> |
michael@0 | 13 | <p id="display"></p> |
michael@0 | 14 | <div id="content" style="display: none"> |
michael@0 | 15 | |
michael@0 | 16 | </div> |
michael@0 | 17 | <div id="testtarget">_</div> |
michael@0 | 18 | <pre id="test"> |
michael@0 | 19 | <script type="application/javascript"> |
michael@0 | 20 | |
michael@0 | 21 | /** Test for Bug 562652 **/ |
michael@0 | 22 | |
michael@0 | 23 | |
michael@0 | 24 | var testCount = 0; |
michael@0 | 25 | function createHTMLDoc() { |
michael@0 | 26 | var dtd = document.implementation.createDocumentType("HTML", "-//W3C//DTD HTML 4.01//EN", null); |
michael@0 | 27 | var d = document.implementation.createDocument(null, null, dtd); |
michael@0 | 28 | d.appendChild(d.createElement("html")); |
michael@0 | 29 | d.documentElement.appendChild(d.createElement("body")); |
michael@0 | 30 | d.body.setAttribute("id", "testtarget"); |
michael@0 | 31 | return d; |
michael@0 | 32 | } |
michael@0 | 33 | |
michael@0 | 34 | function test(d) { |
michael@0 | 35 | var t = d.getElementById("testtarget"); |
michael@0 | 36 | d.addEventListener("DOMNodeInserted", function(e) { ++testCount; }, false); |
michael@0 | 37 | t.innerHTML = "_"; |
michael@0 | 38 | } |
michael@0 | 39 | |
michael@0 | 40 | function runTests() { |
michael@0 | 41 | test(document); |
michael@0 | 42 | test(createHTMLDoc()); |
michael@0 | 43 | is(testCount, 2, "DOMNodeInserted should have fired 2 times!"); |
michael@0 | 44 | SimpleTest.finish(); |
michael@0 | 45 | } |
michael@0 | 46 | |
michael@0 | 47 | addLoadEvent(runTests); |
michael@0 | 48 | |
michael@0 | 49 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 50 | |
michael@0 | 51 | </script> |
michael@0 | 52 | </pre> |
michael@0 | 53 | </body> |
michael@0 | 54 | </html> |