tor-browser

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

test_setWithNamedGetterNoNamedSetter.html (1148B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=1043690
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug 1043690</title>
      9  <script 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=1043690">Mozilla Bug 1043690</a>
     14 <p id="display"></p>
     15 <div id="content" style="display: none">
     16 <form>
     17  <input name="action">
     18 </form>
     19 </div>
     20  <script type="application/javascript">
     21 
     22  /** Test for Bug 1043690 */
     23  var f = document.querySelector("form");
     24  var i = document.querySelector("input");
     25  is(f.getAttribute("action"), null, "Should have no action attribute");
     26  is(f.action, i, "form.action should be the input");
     27  f.action = "http://example.org";
     28  is(f.getAttribute("action"), "http://example.org",
     29     "Should have an action attribute now");
     30  is(f.action, i, "form.action should still be the input");
     31  i.remove();
     32  is(f.action, "http://example.org/",
     33     "form.action should no longer be shadowed");
     34 
     35 
     36  </script>
     37 <pre id="test">
     38 </pre>
     39 </body>
     40 </html>