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