tor-browser

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

input-value-invalidstateerr.html (841B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <title>Forms</title>
      5  <script src="/resources/testharness.js"></script>
      6  <script src="/resources/testharnessreport.js"></script>
      7 </head>
      8 <body>
      9  <p>
     10    <h3>input_value_INVALID_STATE_ERR</h3>
     11  </p>
     12 
     13  <hr>
     14 
     15  <div id="log"></div>
     16 
     17  <form method="post"
     18      enctype="application/x-www-form-urlencoded"
     19      action=""
     20      name="input_form">
     21  <p><input type='file' id='input_file'></p>
     22  </form>
     23 
     24  <script>
     25 
     26    var input_file = document.getElementById("input_file");
     27    try {
     28      input_file.value = "val";
     29      test(function() {
     30        assert_unreached("INVALID_STATE_ERR error is not raised.");
     31      });
     32    } catch (e) {
     33      test(function() {
     34        assert_equals(e.code, e["INVALID_STATE_ERR"], "INVALID_STATE_ERR error is not raised.");
     35      });
     36    }
     37 
     38  </script>
     39 
     40 </body>
     41 </html>