content/html/document/test/test_bug497242.xhtml

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <html xmlns="http://www.w3.org/1999/xhtml">
     2 <!--
     3 https://bugzilla.mozilla.org/show_bug.cgi?id=497242
     4 -->
     5 <head>
     6   <title>Test for Bug 497242</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=497242">Mozilla Bug 497242</a>
    12 <p id="display"></p>
    13 <div id="content" style="display: none">
    14   <form name="foo"/>
    15   <form name="foo"/>
    16   <form name="bar"/>
    17   <form name="bar" xmlns=""/>
    18 </div>
    19 <pre id="test">
    20 <script type="application/javascript">
    21 <![CDATA[
    23 /** Test for Bug 497242 **/
    24 is(document.getElementsByName("foo").length, 2,
    25    "Should find both forms with name 'foo'");
    26 is(document.getElementsByName("foo")[0],
    27    document.getElementsByTagName("form")[0],
    28    "Unexpected first foo");
    29 is(document.getElementsByName("foo")[1],
    30    document.getElementsByTagName("form")[1],
    31    "Unexpected second foo");
    32 is(document.getElementsByName("bar").length, 1,
    33    "Should find only the HTML form with name 'bar'");
    34 is(document.getElementsByName("bar")[0],
    35    document.getElementsByTagName("form")[2],
    36    "Unexpected bar");
    37 ]]>
    38 </script>
    39 </pre>
    40 </body>
    41 </html>

mercurial