1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/test/test_bug698381.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,56 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 + <!-- 1.7 + https://bugzilla.mozilla.org/show_bug.cgi?id=698381 1.8 + --> 1.9 + <head> 1.10 + <title>Test for Bug 698381</title> 1.11 + <script type="text/javascript" 1.12 + src="/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <script src="/tests/SimpleTest/EventUtils.js" 1.14 + type="text/javascript"></script> 1.15 + <link rel="stylesheet" type="text/css" 1.16 + href="/tests/SimpleTest/test.css" /> 1.17 + </head> 1.18 + <body onload="runTests();"> 1.19 + <a target="_blank" 1.20 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=698381"> 1.21 + Mozilla Bug 698381</a> 1.22 + <p id="display"></p> 1.23 + <div id="content" style="display: none"></div> 1.24 + <div id="noChildren" style="display: none"></div> 1.25 + <div id="hasChildren" style="display: none"> 1.26 + <div id="childOne" style="display: none"></div> 1.27 + </div> 1.28 + <pre id="test"> 1.29 + <script type="text/javascript"> 1.30 + /* 1.31 + Checks to see if default parameter handling is correct when 0 1.32 + parameters are passed. 1.33 + 1.34 + If none are passed, then Node.cloneNode should default aDeep 1.35 + to true. 1.36 + */ 1.37 + SimpleTest.waitForExplicitFinish(); 1.38 + 1.39 + var hasChildren = document.getElementById("hasChildren"), 1.40 + noChildren = document.getElementById("noChildren"), 1.41 + clonedNode; 1.42 + 1.43 + function runTests() { 1.44 + 1.45 + // Test Node.cloneNode when no arguments are given 1.46 + clonedNode = hasChildren.cloneNode(); 1.47 + is(clonedNode.hasChildNodes(), false, "Node.cloneNode with false " + 1.48 + "default on a node with children does not clone the child nodes."); 1.49 + 1.50 + clonedNode = noChildren.cloneNode(); 1.51 + is(clonedNode.hasChildNodes(), false, "Node.cloneNode with false " + 1.52 + "default on a node without children doesn't clone child nodes." ); 1.53 + 1.54 + SimpleTest.finish(); 1.55 + } 1.56 + </script> 1.57 + </pre> 1.58 + </body> 1.59 +</html>