toolkit/components/passwordmgr/test/test_basic_form_0pw.html

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 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4   <title>Test for Login Manager</title>
     5   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
     6   <script type="text/javascript" src="pwmgr_common.js"></script>
     7   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     8 </head>
     9 <body>
    10 Login Manager test: forms with no password fields
    11 <p id="display"></p>
    13 <div id="content" style="display: none">
    15   <!-- Form with no user field or password field -->
    16   <form id="form1" action="formtest.js">
    17     <button type="submit">Submit</button>
    18     <button type="reset"> Reset </button>
    19   </form>
    21   <!-- Form with no user field or password field, but one other field -->
    22   <form id="form2" action="formtest.js">
    23     <input  type="checkbox">
    24     <button type="submit">Submit</button>
    25     <button type="reset"> Reset </button>
    26   </form>
    28   <!-- Form with no user field or password field, but one other field -->
    29   <form id="form3" action="formtest.js">
    30     <input  type="checkbox" name="uname" value="">
    31     <button type="submit">Submit</button>
    32     <button type="reset"> Reset </button>
    33   </form>
    35   <!-- Form with a text field, but no password field -->
    36   <form id="form4" action="formtest.js">
    37     <input  type="text"       name="yyyyy">
    39     <button type="submit">Submit</button>
    40     <button type="reset"> Reset </button>
    41   </form>
    43   <!-- Form with a user field, but no password field -->
    44   <form id="form5" action="formtest.js">
    45     <input  type="text"       name="uname">
    47     <button type="submit">Submit</button>
    48     <button type="reset"> Reset </button>
    49   </form>
    51 </div>
    53 <pre id="test">
    54 <script class="testbody" type="text/javascript">
    56 /** Test for Login Manager: form fill, no password fields. **/
    58 commonInit();
    60 function startTest() {
    61   is($_(3, "uname").value, "", "Checking for unfilled checkbox (form 3)");
    62   is($_(4, "yyyyy").value, "", "Checking for unfilled text field (form 4)");
    63   is($_(5, "uname").value, "", "Checking for unfilled text field (form 5)");
    65   SimpleTest.finish();
    66 }
    68 window.onload = startTest;
    70 SimpleTest.waitForExplicitFinish();
    71 </script>
    72 </pre>
    73 </body>
    74 </html>

mercurial