1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/components/passwordmgr/test/test_basic_form_0pw.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,75 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<head> 1.7 + <title>Test for Login Manager</title> 1.8 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.9 + <script type="text/javascript" src="pwmgr_common.js"></script> 1.10 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.11 +</head> 1.12 +<body> 1.13 +Login Manager test: forms with no password fields 1.14 +<p id="display"></p> 1.15 + 1.16 +<div id="content" style="display: none"> 1.17 + 1.18 + <!-- Form with no user field or password field --> 1.19 + <form id="form1" action="formtest.js"> 1.20 + <button type="submit">Submit</button> 1.21 + <button type="reset"> Reset </button> 1.22 + </form> 1.23 + 1.24 + <!-- Form with no user field or password field, but one other field --> 1.25 + <form id="form2" action="formtest.js"> 1.26 + <input type="checkbox"> 1.27 + <button type="submit">Submit</button> 1.28 + <button type="reset"> Reset </button> 1.29 + </form> 1.30 + 1.31 + <!-- Form with no user field or password field, but one other field --> 1.32 + <form id="form3" action="formtest.js"> 1.33 + <input type="checkbox" name="uname" value=""> 1.34 + <button type="submit">Submit</button> 1.35 + <button type="reset"> Reset </button> 1.36 + </form> 1.37 + 1.38 + <!-- Form with a text field, but no password field --> 1.39 + <form id="form4" action="formtest.js"> 1.40 + <input type="text" name="yyyyy"> 1.41 + 1.42 + <button type="submit">Submit</button> 1.43 + <button type="reset"> Reset </button> 1.44 + </form> 1.45 + 1.46 + <!-- Form with a user field, but no password field --> 1.47 + <form id="form5" action="formtest.js"> 1.48 + <input type="text" name="uname"> 1.49 + 1.50 + <button type="submit">Submit</button> 1.51 + <button type="reset"> Reset </button> 1.52 + </form> 1.53 + 1.54 +</div> 1.55 + 1.56 +<pre id="test"> 1.57 +<script class="testbody" type="text/javascript"> 1.58 + 1.59 +/** Test for Login Manager: form fill, no password fields. **/ 1.60 + 1.61 +commonInit(); 1.62 + 1.63 +function startTest() { 1.64 + is($_(3, "uname").value, "", "Checking for unfilled checkbox (form 3)"); 1.65 + is($_(4, "yyyyy").value, "", "Checking for unfilled text field (form 4)"); 1.66 + is($_(5, "uname").value, "", "Checking for unfilled text field (form 5)"); 1.67 + 1.68 + SimpleTest.finish(); 1.69 +} 1.70 + 1.71 +window.onload = startTest; 1.72 + 1.73 +SimpleTest.waitForExplicitFinish(); 1.74 +</script> 1.75 +</pre> 1.76 +</body> 1.77 +</html> 1.78 +