|
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> |
|
12 |
|
13 <div id="content" style="display: none"> |
|
14 |
|
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> |
|
20 |
|
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> |
|
27 |
|
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> |
|
34 |
|
35 <!-- Form with a text field, but no password field --> |
|
36 <form id="form4" action="formtest.js"> |
|
37 <input type="text" name="yyyyy"> |
|
38 |
|
39 <button type="submit">Submit</button> |
|
40 <button type="reset"> Reset </button> |
|
41 </form> |
|
42 |
|
43 <!-- Form with a user field, but no password field --> |
|
44 <form id="form5" action="formtest.js"> |
|
45 <input type="text" name="uname"> |
|
46 |
|
47 <button type="submit">Submit</button> |
|
48 <button type="reset"> Reset </button> |
|
49 </form> |
|
50 |
|
51 </div> |
|
52 |
|
53 <pre id="test"> |
|
54 <script class="testbody" type="text/javascript"> |
|
55 |
|
56 /** Test for Login Manager: form fill, no password fields. **/ |
|
57 |
|
58 commonInit(); |
|
59 |
|
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)"); |
|
64 |
|
65 SimpleTest.finish(); |
|
66 } |
|
67 |
|
68 window.onload = startTest; |
|
69 |
|
70 SimpleTest.waitForExplicitFinish(); |
|
71 </script> |
|
72 </pre> |
|
73 </body> |
|
74 </html> |
|
75 |