зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 9b06a1b666e8 (bug 1304306)
This commit is contained in:
Родитель
512e79b796
Коммит
a4f8405116
|
@ -1,4 +1,3 @@
|
|||
[DEFAULT]
|
||||
|
||||
[browser_check_installed.js]
|
||||
[browser_privacyPreferences.js]
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
const PAGE_PREFS = "about:preferences";
|
||||
const PAGE_PRIVACY = PAGE_PREFS + "#privacy";
|
||||
const GROUP_AUTOFILL = "#formAutofillGroup";
|
||||
const CHECKBOX_AUTOFILL = GROUP_AUTOFILL + " checkbox";
|
||||
const PREF_AUTOFILL_ENABLED = "browser.formautofill.enabled";
|
||||
|
||||
let args = {
|
||||
group: GROUP_AUTOFILL,
|
||||
checkbox: CHECKBOX_AUTOFILL,
|
||||
};
|
||||
|
||||
// Visibility of form autofill group should be hidden when opening
|
||||
// preferences page.
|
||||
add_task(function* test_aboutPreferences() {
|
||||
yield BrowserTestUtils.withNewTab({gBrowser, url: PAGE_PREFS}, function* (browser) {
|
||||
yield ContentTask.spawn(browser, args, (args) => {
|
||||
is(content.document.querySelector(args.group).hidden, true,
|
||||
"Form Autofill group should be hidden");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Visibility of form autofill group should be visible when opening
|
||||
// directly to privacy page. Checkbox is not checked by default.
|
||||
add_task(function* test_aboutPreferencesPrivacy() {
|
||||
yield BrowserTestUtils.withNewTab({gBrowser, url: PAGE_PRIVACY}, function* (browser) {
|
||||
yield ContentTask.spawn(browser, args, (args) => {
|
||||
is(content.document.querySelector(args.group).hidden, false,
|
||||
"Form Autofill group should be visible");
|
||||
is(content.document.querySelector(args.checkbox).checked, false,
|
||||
"Checkbox should be unchecked");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Checkbox should be checked when form autofill is enabled.
|
||||
add_task(function* test_autofillEnabledCheckbox() {
|
||||
SpecialPowers.pushPrefEnv({set: [[PREF_AUTOFILL_ENABLED, true]]});
|
||||
|
||||
yield BrowserTestUtils.withNewTab({gBrowser, url: PAGE_PRIVACY}, function* (browser) {
|
||||
yield ContentTask.spawn(browser, args, (args) => {
|
||||
is(content.document.querySelector(args.group).hidden, false,
|
||||
"Form Autofill group should be visible");
|
||||
is(content.document.querySelector(args.checkbox).checked, true,
|
||||
"Checkbox should be checked when Form Autofill is enabled");
|
||||
});
|
||||
});
|
||||
});
|
|
@ -357,6 +357,3 @@ user_pref("media.openUnsupportedTypeWithExternalApp", false);
|
|||
// Disable password capture, so that mochitests that include forms aren't
|
||||
// influenced by the presence of the persistent doorhanger notification.
|
||||
user_pref("signon.rememberSignons", false);
|
||||
|
||||
// Enable form autofill feature testing.
|
||||
user_pref("browser.formautofill.experimental", true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче