2007-04-22 16:56:06 -07:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
2007-05-16 03:02:45 -07:00
|
|
|
<title>Test for Login Manager</title>
|
2009-05-06 13:46:04 -07:00
|
|
|
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
2007-04-22 16:56:06 -07:00
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<script type="text/javascript" src="pwmgr_common.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
2007-05-16 03:02:45 -07:00
|
|
|
Login Manager test: simple form fill
|
2007-04-22 16:56:06 -07:00
|
|
|
<p id="display"></p>
|
|
|
|
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
|
2007-06-25 14:20:55 -07:00
|
|
|
<form id="form1" action="formtest.js">
|
|
|
|
<p>This is form 1.</p>
|
|
|
|
<input type="text" name="uname">
|
|
|
|
<input type="password" name="pword">
|
2007-04-22 16:56:06 -07:00
|
|
|
|
|
|
|
<button type="submit">Submit</button>
|
|
|
|
<button type="reset"> Reset </button>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre id="test">
|
|
|
|
<script class="testbody" type="text/javascript">
|
|
|
|
|
2007-05-16 03:02:45 -07:00
|
|
|
/** Test for Login Manager: form fill, multiple forms. **/
|
2007-04-22 16:56:06 -07:00
|
|
|
|
|
|
|
// Make sure that all forms in a document are processed.
|
|
|
|
|
|
|
|
function startTest() {
|
2007-06-25 14:20:55 -07:00
|
|
|
is($_(1, "uname").value, "testuser", "Checking for filled username");
|
|
|
|
is($_(1, "pword").value, "testpass", "Checking for filled password");
|
2007-04-22 16:56:06 -07:00
|
|
|
|
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
window.onload = startTest;
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|