Wed, 31 Dec 2014 06:09:35 +0100
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 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=355063
5 -->
6 <head>
7 <meta charset="utf-8"/>
8 <title>Test for Bug 355063</title>
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 <script type="text/javascript" src="pwmgr_common.js"></script>
12 <script type="application/javascript">
13 /** Test for Bug 355063 **/
15 function startTest() {
16 info("startTest");
17 addForm();
18 }
20 function addForm() {
21 info("addForm");
22 var c = document.getElementById("content");
23 c.innerHTML = "<form id=form1>form1: <input id=u1><input type=password id=p1></form><br>";
24 }
26 function checkForm() {
27 info("checkForm");
28 var userField = document.getElementById("u1");
29 var passField = document.getElementById("p1");
30 is(userField.value, "testuser", "checking filled username");
31 is(passField.value, "testpass", "checking filled password");
33 SpecialPowers.removeChromeEventListener("DOMFormHasPassword", checkForm);
34 SimpleTest.finish();
35 }
37 commonInit();
39 // Password Manager's own listener should always have been added first, so
40 // the test's listener should be called after the pwmgr's listener fills in
41 // a login.
42 //
43 SpecialPowers.addChromeEventListener("DOMFormHasPassword", checkForm);
44 window.addEventListener("load", startTest);
45 SimpleTest.waitForExplicitFinish();
46 </script>
47 </head>
48 <body>
49 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=355063">Mozilla Bug 355063</a>
50 <p id="display"></p>
51 <div id="content">
52 forms go here!
53 </div>
54 <pre id="test">
55 </pre>
56 </body>
57 </html>