content/base/test/test_bug738108.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

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=738108
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 738108</title>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11 </head>
    12 <body>
    13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=738108">Mozilla Bug 738108</a>
    14 <p id="display"></p>
    15 <div id="content" style="display: none">
    16   <div id="foo"></div>
    17 </div>
    18 <pre id="test">
    19 <script type="application/javascript">
    21 /** Test for Bug 738108 **/
    22 is(document.querySelector("#foo"), $("foo"),
    23    "querySelector on document should find element by id")
    24 is($("content").querySelector("#foo"), $("foo"),
    25    "querySelector on parent element should find element by id")
    26 is($("foo").querySelector("#foo"), null,
    27    "querySelector on element should not find the element itself by id")
    29 is(document.querySelectorAll("#foo").length, 1,
    30    "querySelectorAll on document should find element by id")
    31 is($("content").querySelectorAll("#foo").length, 1,
    32    "querySelectorAll on parent element should find element by id")
    33 is($("foo").querySelectorAll("#foo").length, 0,
    34    "querySelectorall on element should not find the element itself by id")
    36 </script>
    37 </pre>
    38 </body>
    39 </html>

mercurial