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=698381 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Test for Bug 698381</title> |
michael@0 | 8 | <script type="text/javascript" |
michael@0 | 9 | src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | <script src="/tests/SimpleTest/EventUtils.js" |
michael@0 | 11 | type="text/javascript"></script> |
michael@0 | 12 | <link rel="stylesheet" type="text/css" |
michael@0 | 13 | href="/tests/SimpleTest/test.css" /> |
michael@0 | 14 | </head> |
michael@0 | 15 | <body onload="runTests();"> |
michael@0 | 16 | <a target="_blank" |
michael@0 | 17 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=698381"> |
michael@0 | 18 | Mozilla Bug 698381</a> |
michael@0 | 19 | <p id="display"></p> |
michael@0 | 20 | <div id="content" style="display: none"></div> |
michael@0 | 21 | <div id="noChildren" style="display: none"></div> |
michael@0 | 22 | <div id="hasChildren" style="display: none"> |
michael@0 | 23 | <div id="childOne" style="display: none"></div> |
michael@0 | 24 | </div> |
michael@0 | 25 | <pre id="test"> |
michael@0 | 26 | <script type="text/javascript"> |
michael@0 | 27 | /* |
michael@0 | 28 | Checks to see if default parameter handling is correct when 0 |
michael@0 | 29 | parameters are passed. |
michael@0 | 30 | |
michael@0 | 31 | If none are passed, then Node.cloneNode should default aDeep |
michael@0 | 32 | to true. |
michael@0 | 33 | */ |
michael@0 | 34 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 35 | |
michael@0 | 36 | var hasChildren = document.getElementById("hasChildren"), |
michael@0 | 37 | noChildren = document.getElementById("noChildren"), |
michael@0 | 38 | clonedNode; |
michael@0 | 39 | |
michael@0 | 40 | function runTests() { |
michael@0 | 41 | |
michael@0 | 42 | // Test Node.cloneNode when no arguments are given |
michael@0 | 43 | clonedNode = hasChildren.cloneNode(); |
michael@0 | 44 | is(clonedNode.hasChildNodes(), false, "Node.cloneNode with false " + |
michael@0 | 45 | "default on a node with children does not clone the child nodes."); |
michael@0 | 46 | |
michael@0 | 47 | clonedNode = noChildren.cloneNode(); |
michael@0 | 48 | is(clonedNode.hasChildNodes(), false, "Node.cloneNode with false " + |
michael@0 | 49 | "default on a node without children doesn't clone child nodes." ); |
michael@0 | 50 | |
michael@0 | 51 | SimpleTest.finish(); |
michael@0 | 52 | } |
michael@0 | 53 | </script> |
michael@0 | 54 | </pre> |
michael@0 | 55 | </body> |
michael@0 | 56 | </html> |