content/base/test/test_bug499656.xhtml

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 <html xmlns="http://www.w3.org/1999/xhtml">
     2 <!--
     3 https://bugzilla.mozilla.org/show_bug.cgi?id=499655
     4 -->
     5 <head>
     6   <title>Test for Bug 499655</title>
     7   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     8   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     9 </head>
    10 <body>
    11 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=499655">Mozilla Bug 499655</a>
    12 <p id="display"></p>
    13 <div id="content" style="display: none">
    15 </div>
    16 <pre id="test">
    17 <script type="application/javascript">
    18 <![CDATA[
    20 div1 = document.createElementNS("http://www.w3.org/1999/xhtml","test");
    21 div2 = document.createElementNS("http://www.w3.org/1999/xhtml","TEst");
    22 div3 = document.createElementNS("test","test");
    23 div4 = document.createElementNS("test","TEst");
    24 div5 = document.createElement("test");
    25 div6 = document.createElement("TEst");
    27 content = document.getElementById("content");
    29 content.appendChild(div1);
    30 content.appendChild(div2);
    31 content.appendChild(div3);
    32 content.appendChild(div4);
    33 content.appendChild(div5);
    34 content.appendChild(div6);
    37 list = document.getElementsByTagName('test');
    38 is(list.length, 3, "Number of elements found");
    39 ok(list[0] == div1, "First element didn't match");
    40 ok(list[1] == div3, "Third element didn't match");
    41 ok(list[2] == div5, "Fifth element didn't match");
    43 list = document.getElementsByTagName('TEst');
    44 is(list.length, 3, "Number of elements found");
    45 ok(list[0] == div2, "Second element didn't match");
    46 ok(list[1] == div4, "Fourth element didn't match");
    47 ok(list[2] == div6, "Sixth element didn't match");
    49 list = document.getElementsByTagNameNS('test', 'test');
    50 is(list.length, 1, "Wrong number of elements found");
    51 ok(list[0] == div3, "Third element didn't match");
    53 ]]>
    54 </script>
    55 </pre>
    56 </body>
    57 </html>

mercurial