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.)

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

mercurial