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 | <head> |
michael@0 | 4 | <title>Test for Login Manager</title> |
michael@0 | 5 | <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 6 | <script type="text/javascript" src="pwmgr_common.js"></script> |
michael@0 | 7 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
michael@0 | 8 | </head> |
michael@0 | 9 | <body> |
michael@0 | 10 | Login Manager test: form with JS submit action |
michael@0 | 11 | <script> |
michael@0 | 12 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 13 | var pwmgr = SpecialPowers.Cc["@mozilla.org/login-manager;1"] |
michael@0 | 14 | .getService(SpecialPowers.Ci.nsILoginManager); |
michael@0 | 15 | var jslogin = SpecialPowers.Cc["@mozilla.org/login-manager/loginInfo;1"] |
michael@0 | 16 | .createInstance(SpecialPowers.Ci.nsILoginInfo); |
michael@0 | 17 | jslogin.init("http://mochi.test:8888", "javascript:", null, |
michael@0 | 18 | "jsuser", "jspass123", "uname", "pword"); |
michael@0 | 19 | pwmgr.addLogin(jslogin); |
michael@0 | 20 | |
michael@0 | 21 | /** Test for Login Manager: JS action URL **/ |
michael@0 | 22 | |
michael@0 | 23 | function startTest() { |
michael@0 | 24 | checkForm(1, "jsuser", "jspass123"); |
michael@0 | 25 | |
michael@0 | 26 | pwmgr.removeLogin(jslogin); |
michael@0 | 27 | SimpleTest.finish(); |
michael@0 | 28 | } |
michael@0 | 29 | |
michael@0 | 30 | window.onload = startTest; |
michael@0 | 31 | </script> |
michael@0 | 32 | |
michael@0 | 33 | <p id="display"></p> |
michael@0 | 34 | |
michael@0 | 35 | <div id="content" style="display: none"> |
michael@0 | 36 | |
michael@0 | 37 | |
michael@0 | 38 | <form id='form1' action='javascript:alert("never shows")'> 1 |
michael@0 | 39 | <input name="uname"> |
michael@0 | 40 | <input name="pword" type="password"> |
michael@0 | 41 | |
michael@0 | 42 | <button type='submit'>Submit</button> |
michael@0 | 43 | <button type='reset'> Reset </button> |
michael@0 | 44 | </form> |
michael@0 | 45 | |
michael@0 | 46 | </div> |
michael@0 | 47 | |
michael@0 | 48 | <pre id="test"></pre> |
michael@0 | 49 | </body> |
michael@0 | 50 | </html> |
michael@0 | 51 |