content/base/test/test_bug698381.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial