toolkit/components/passwordmgr/test/test_basic_form.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/components/passwordmgr/test/test_basic_form.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     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: simple form fill
    1.14 +
    1.15 +<script>
    1.16 +commonInit();
    1.17 +SimpleTest.waitForExplicitFinish();
    1.18 +
    1.19 +/** Test for Login Manager: form fill, multiple forms. **/
    1.20 +
    1.21 +function startTest() {
    1.22 +  is($_(1, "uname").value, "testuser", "Checking for filled username");
    1.23 +  is($_(1, "pword").value, "testpass", "Checking for filled password");
    1.24 +
    1.25 +  SimpleTest.finish();
    1.26 +}
    1.27 +
    1.28 +window.onload = startTest;
    1.29 +</script>
    1.30 +
    1.31 +<p id="display"></p>
    1.32 +
    1.33 +<div id="content" style="display: none">
    1.34 +
    1.35 +  <form id="form1" action="formtest.js">
    1.36 +    <p>This is form 1.</p>
    1.37 +    <input  type="text"       name="uname">
    1.38 +    <input  type="password"   name="pword">
    1.39 +
    1.40 +    <button type="submit">Submit</button>
    1.41 +    <button type="reset"> Reset </button>
    1.42 +  </form>
    1.43 +
    1.44 +</div>
    1.45 +
    1.46 +<pre id="test"></pre>
    1.47 +</body>
    1.48 +</html>
    1.49 +

mercurial