tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_bug891952.html (2315B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=891952
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug 891952</title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11  <script type="application/javascript">
     12 
     13  /** Test for Bug 891952 */
     14    SimpleTest.waitForExplicitFinish();
     15    addLoadEvent(function() {
     16      var all = document.all;
     17      is(all.content, $("content"), "Should find the content");
     18      ok(!("" in all), "Should not have an empty string prop on document.all");
     19      is(all[""], undefined, "Should not get empty string on document.all");
     20      is(all.namedItem(""), null,
     21         "namedItem for empty string should return null on document.all");
     22 
     23      var divs = document.getElementsByTagName("div");
     24      ok(!("" in divs), "Should not have an empty string prop on getElementsByTagName");
     25      is(divs[""], undefined, "Should not get empty string on getElementsByTagName");
     26      is(divs.namedItem(""), null,
     27         "namedItem for empty string should return null on getElementsByTagName");
     28      var forms = document.forms;
     29      ok(!("" in forms), "Should not have an empty string prop on document.forms");
     30      is(forms[""], undefined, "Should not get empty string on document.forms");
     31      is(forms.namedItem(""), null,
     32         "namedItem for empty string should return null on document.forms");
     33 
     34      var form = $("form");
     35      ok(!("" in form), "Should not have an empty string prop on form");
     36      is(form[""], undefined, "Should not get empty string on form");
     37 
     38      var formEls = $("form").elements;
     39      ok(!("" in formEls), "Should not have an empty string prop on form.elements");
     40      is(formEls[""], undefined, "Should not get empty string on form.elements");
     41      is(formEls.namedItem(""), null,
     42         "namedItem for empty string should return null on form.elements");
     43      SimpleTest.finish();
     44    });
     45 
     46  </script>
     47 </head>
     48 <body>
     49 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=891952">Mozilla Bug 891952</a>
     50 <p id="display"></p>
     51 <div id="content" style="display: none">
     52  <div id=""></div>
     53  <div name=""></div>
     54  <form id="form" name="">
     55    <input name="">
     56  </form>
     57 </div>
     58 <pre id="test">
     59 </pre>
     60 </body>
     61 </html>