summaryrefslogtreecommitdiffstats
path: root/toolkit/components/passwordmgr/test/mochitest/test_autofill_password-only.html
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-25 15:07:00 -0500
committerMatt A. Tobin <email@mattatobin.com>2020-02-25 15:07:00 -0500
commit0ddd00f1959c78ce37c14fef3c83401408fca3bf (patch)
treed408e02767c86cf8aac3acbb86722b03c77ede6f /toolkit/components/passwordmgr/test/mochitest/test_autofill_password-only.html
parent20f0905b33cbb18d1caa80c55e2f552c2e18957b (diff)
downloadUXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar
UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.gz
UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.lz
UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.xz
UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.zip
Issue #439 - Remove tests from toolkit/
Diffstat (limited to 'toolkit/components/passwordmgr/test/mochitest/test_autofill_password-only.html')
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_autofill_password-only.html143
1 files changed, 0 insertions, 143 deletions
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_autofill_password-only.html b/toolkit/components/passwordmgr/test/mochitest/test_autofill_password-only.html
deleted file mode 100644
index 983356371..000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_autofill_password-only.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test password-only forms should prefer a password-only login when present</title>
- <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>
-Login Manager test: Bug 444968
-<script>
-let pwmgrCommonScript = runInParent(SimpleTest.getTestFileURL("pwmgr_common.js"));
-pwmgrCommonScript.sendSyncMessage("setupParent", { selfFilling: true });
-
-SimpleTest.waitForExplicitFinish();
-
-let chromeScript = runInParent(function chromeSetup() {
- const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
- let pwmgr = Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
-
- let login1A = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let login1B = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let login2A = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let login2B = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let login2C = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
-
- login1A.init("http://mochi.test:8888", "http://bug444968-1", null,
- "testuser1A", "testpass1A", "", "");
- login1B.init("http://mochi.test:8888", "http://bug444968-1", null,
- "", "testpass1B", "", "");
-
- login2A.init("http://mochi.test:8888", "http://bug444968-2", null,
- "testuser2A", "testpass2A", "", "");
- login2B.init("http://mochi.test:8888", "http://bug444968-2", null,
- "", "testpass2B", "", "");
- login2C.init("http://mochi.test:8888", "http://bug444968-2", null,
- "testuser2C", "testpass2C", "", "");
-
- pwmgr.addLogin(login1A);
- pwmgr.addLogin(login1B);
- pwmgr.addLogin(login2A);
- pwmgr.addLogin(login2B);
- pwmgr.addLogin(login2C);
-
- addMessageListener("removeLogins", function removeLogins() {
- pwmgr.removeLogin(login1A);
- pwmgr.removeLogin(login1B);
- pwmgr.removeLogin(login2A);
- pwmgr.removeLogin(login2B);
- pwmgr.removeLogin(login2C);
- });
-});
-
-SimpleTest.registerCleanupFunction(() => chromeScript.sendSyncMessage("removeLogins"));
-
-registerRunTests();
-</script>
-
-<p id="display"></p>
-<div id="content" style="display: none">
- <!-- first 3 forms have matching user+pass and pass-only logins -->
-
- <!-- user+pass form. -->
- <form id="form1" action="http://bug444968-1">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- password-only form. -->
- <form id="form2" action="http://bug444968-1">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- user+pass form, username prefilled -->
- <form id="form3" action="http://bug444968-1">
- <input type="text" name="uname" value="testuser1A">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
-
- <!-- next 4 forms have matching user+pass (2x) and pass-only (1x) logins -->
-
- <!-- user+pass form. -->
- <form id="form4" action="http://bug444968-2">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- password-only form. -->
- <form id="form5" action="http://bug444968-2">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- user+pass form, username prefilled -->
- <form id="form6" action="http://bug444968-2">
- <input type="text" name="uname" value="testuser2A">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- user+pass form, username prefilled -->
- <form id="form7" action="http://bug444968-2">
- <input type="text" name="uname" value="testuser2C">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/* Test for Login Manager: 444968 (password-only forms should prefer a
- * password-only login when present )
- */
-function startTest() {
- checkForm(1, "testuser1A", "testpass1A");
- checkForm(2, "testpass1B");
- checkForm(3, "testuser1A", "testpass1A");
-
- checkUnmodifiedForm(4); // 2 logins match
- checkForm(5, "testpass2B");
- checkForm(6, "testuser2A", "testpass2A");
- checkForm(7, "testuser2C", "testpass2C");
-
- SimpleTest.finish();
-}
-
-window.addEventListener("runTests", startTest);
-</script>
-</pre>
-</body>
-</html>