Backed out changeset e144f4d450c7 (bug 1325778) for causing perma failing test_insecure_form_field_autocomplete.html CLOSED TREE

This commit is contained in:
Noemi Erli 2019-03-28 07:02:21 +02:00
Родитель 34ec76e11d
Коммит 3bee475934
1 изменённых файлов: 1 добавлений и 28 удалений

Просмотреть файл

@ -444,9 +444,7 @@ add_task(async function test_form1_delete_second() {
// Delete the second entry (of 3), "testuser3"
synthesizeKey("KEY_ArrowDown");
synthesizeKey("KEY_ArrowDown");
let storageChanged = promiseStorageChanged(["removeLogin"]);
synthesizeKey("KEY_Delete", {shiftKey: true});
await storageChanged;
checkACForm("", "");
let numLogins = LoginManager.countLogins("http://mochi.test:8888", "", null);
is(numLogins, 3, "Correct number of logins after deleting one");
@ -480,9 +478,7 @@ add_task(async function test_form1_delete_last() {
// Delete the last entry (of 2), "zzzuser4"
synthesizeKey("KEY_ArrowDown");
synthesizeKey("KEY_ArrowDown");
let storageChanged = promiseStorageChanged(["removeLogin"]);
synthesizeKey("KEY_Delete", {shiftKey: true});
await storageChanged;
checkACForm("", "");
let numLogins = LoginManager.countLogins("http://mochi.test:8888", "", null);
is(numLogins, 2, "Correct number of logins after deleting one");
@ -517,7 +513,6 @@ add_task(async function test_form1_check_only_entry_remaining() {
// test 56
// Delete the only remaining entry, "testuser2"
synthesizeKey("KEY_ArrowDown");
let storageChanged = promiseStorageChanged(["removeLogin", "removeLogin"]);
synthesizeKey("KEY_Delete", {shiftKey: true});
checkACForm("", "");
let numLogins = LoginManager.countLogins("http://mochi.test:8888", "", null);
@ -525,14 +520,11 @@ add_task(async function test_form1_check_only_entry_remaining() {
// remove the login that's not shown in the list.
setupScript.sendSyncMessage("removeLogin", "login0");
await storageChanged;
});
// Tests for single-user forms for ignoring autocomplete=off
add_task(async function test_form2() {
let storageChanged = promiseStorageChanged(["addLogin"]);
setupScript.sendSyncMessage("addLogin", "login5");
await storageChanged;
await setFormAndWaitForFieldFilled(`
<!-- other forms test single logins, with autocomplete=off set -->
<form id="form2" action="http://autocomplete2" onsubmit="return false;">
@ -663,16 +655,12 @@ add_task(async function test_form6_changeUsername() {
checkACForm("singleuser5X", "singlepass5");
uname.focus();
let storageChanged = promiseStorageChanged(["removeLogin"]);
setupScript.sendSyncMessage("removeLogin", "login5");
await storageChanged;
});
add_task(async function test_form7() {
let storageChanged = promiseStorageChanged(["addLogin", "addLogin"]);
setupScript.sendSyncMessage("addLogin", "login6A");
setupScript.sendSyncMessage("addLogin", "login6B");
await storageChanged;
await setFormAndWaitForFieldFilled(`
<!-- This form will be manipulated to insert a different username field. -->
<form id="form7" action="http://autocomplete3" onsubmit="return false;">
@ -696,9 +684,7 @@ add_task(async function test_form7() {
// Delete login6B. It was created just to prevent filling in a login
// automatically, removing it makes it more likely that we'll catch a
// future regression with form filling here.
storageChanged = promiseStorageChanged(["removeLogin"]);
setupScript.sendSyncMessage("removeLogin", "login6B");
await storageChanged;
});
add_task(async function test_form7_2() {
@ -720,15 +706,11 @@ add_task(async function test_form7_2() {
is($_(7, "uname2").value, "", "Verifying empty uname2");
restoreForm(); // clear field, so reloading test doesn't fail
let storageChanged = promiseStorageChanged(["removeLogin"]);
setupScript.sendSyncMessage("removeLogin", "login6A");
await storageChanged;
});
add_task(async function test_form8() {
let storageChanged = promiseStorageChanged(["addLogin"]);
setupScript.sendSyncMessage("addLogin", "login7");
await storageChanged;
await setFormAndWaitForFieldFilled(`
<!-- This form will be manipulated to insert a different username field. -->
<form id="form7" action="http://autocomplete3" onsubmit="return false;">
@ -763,15 +745,12 @@ add_task(async function test_form8_2() {
add_task(async function test_form8_3() {
checkACForm("", "");
setupScript.sendSyncMessage("removeLogin", "login7");
});
add_task(async function test_form9_filtering() {
let storageChanged = promiseStorageChanged(["removeLogin", "addLogin", "addLogin"]);
setupScript.sendSyncMessage("removeLogin", "login7");
setupScript.sendSyncMessage("addLogin", "login8A");
setupScript.sendSyncMessage("addLogin", "login8B");
await storageChanged;
await setFormAndWaitForFieldFilled(`
<!-- test autocomplete dropdown -->
<form id="form9" action="http://autocomplete5" onsubmit="return false;">
@ -811,9 +790,7 @@ add_task(async function test_form9_autocomplete_cache() {
// Note that this addLogin call will only be seen by the autocomplete
// attempt for the synthesizeKey if we do not successfully cache the
// autocomplete results.
let storageChanged = promiseStorageChanged(["addLogin"]);
setupScript.sendSyncMessage("addLogin", "login8C");
await storageChanged;
uname.focus();
let promise2 = notifyMenuChanged(2);
let shownPromise = promiseACShown();
@ -832,17 +809,13 @@ add_task(async function test_form9_autocomplete_cache() {
["This connection is not secure. Logins entered here could be compromised. Learn More"],
"mochi.test",
"Check popup only has the footer and insecure warning");
storageChanged = promiseStorageChanged(["removeLogin", "removeLogin", "removeLogin"]);
setupScript.sendSyncMessage("removeLogin", "login8A");
setupScript.sendSyncMessage("removeLogin", "login8B");
setupScript.sendSyncMessage("removeLogin", "login8C");
await storageChanged;
});
add_task(async function test_form11_recipes() {
let storageChanged = promiseStorageChanged(["addLogin"]);
setupScript.sendSyncMessage("addLogin", "login10");
await storageChanged;
await loadRecipes({
siteRecipes: [{
"hosts": ["mochi.test:8888"],