mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-01 12:03:08 +00:00
Bug 1629450 - Permissions manager tests (extensions/permissions/test/unit) failing in Thunderbird since it's running tests with a real profile. r=baku
After bug 1363541 the calls to Services.prefs.setCharPref("permissions.manager.defaultsUrl", ""); must be done early to have any effect. Otherwise the defaults will already be imported and tests do not get the expected starting point. Differential Revision: https://phabricator.services.mozilla.com/D70675 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
ef534a1b06
commit
7e719a42a0
@ -16,9 +16,9 @@ function GetPermissionsFile(profile) {
|
||||
}
|
||||
|
||||
add_task(async function test() {
|
||||
/* Create and set up the permissions database */
|
||||
let profile = do_get_profile();
|
||||
// Create and set up the permissions database.
|
||||
Services.prefs.setCharPref("permissions.manager.defaultsUrl", "");
|
||||
let profile = do_get_profile();
|
||||
|
||||
// We need to execute a pm method to be sure that the DB is fully
|
||||
// initialized.
|
||||
|
@ -16,9 +16,9 @@ function GetPermissionsFile(profile) {
|
||||
}
|
||||
|
||||
add_task(async function test() {
|
||||
/* Create and set up the permissions database */
|
||||
let profile = do_get_profile();
|
||||
// Create and set up the permissions database.
|
||||
Services.prefs.setCharPref("permissions.manager.defaultsUrl", "");
|
||||
let profile = do_get_profile();
|
||||
|
||||
// We need to execute a pm method to be sure that the DB is fully
|
||||
// initialized.
|
||||
|
@ -46,9 +46,9 @@ function GetPermissionsFile(profile) {
|
||||
*/
|
||||
|
||||
add_task(function test() {
|
||||
/* Create and set up the permissions database */
|
||||
let profile = do_get_profile();
|
||||
// Create and set up the permissions database.
|
||||
Services.prefs.setCharPref("permissions.manager.defaultsUrl", "");
|
||||
let profile = do_get_profile();
|
||||
|
||||
// Make sure that we can't resolve the nsINavHistoryService
|
||||
try {
|
||||
|
@ -16,9 +16,9 @@ function GetPermissionsFile(profile) {
|
||||
}
|
||||
|
||||
add_task(async function test() {
|
||||
/* Create and set up the permissions database */
|
||||
let profile = do_get_profile();
|
||||
// Create and set up the permissions database.
|
||||
Services.prefs.setCharPref("permissions.manager.defaultsUrl", "");
|
||||
let profile = do_get_profile();
|
||||
|
||||
// We need to execute a pm method to be sure that the DB is fully
|
||||
// initialized.
|
||||
|
@ -16,9 +16,9 @@ function GetPermissionsFile(profile) {
|
||||
}
|
||||
|
||||
add_task(function test() {
|
||||
/* Create and set up the permissions database */
|
||||
let profile = do_get_profile();
|
||||
// Create and set up the permissions database.
|
||||
Services.prefs.setCharPref("permissions.manager.defaultsUrl", "");
|
||||
let profile = do_get_profile();
|
||||
|
||||
var pm = Services.perms;
|
||||
Assert.equal(pm.all.length, 0, "No cookies");
|
||||
|
@ -16,9 +16,9 @@ function GetPermissionsFile(profile) {
|
||||
}
|
||||
|
||||
add_task(async function test() {
|
||||
/* Create and set up the permissions database */
|
||||
let profile = do_get_profile();
|
||||
// Create and set up the permissions database.
|
||||
Services.prefs.setCharPref("permissions.manager.defaultsUrl", "");
|
||||
let profile = do_get_profile();
|
||||
|
||||
// We need to execute a pm method to be sure that the DB is fully
|
||||
// initialized.
|
||||
|
@ -16,9 +16,9 @@ function GetPermissionsFile(profile) {
|
||||
}
|
||||
|
||||
add_task(function test() {
|
||||
/* Create and set up the permissions database */
|
||||
let profile = do_get_profile();
|
||||
// Create and set up the permissions database.
|
||||
Services.prefs.setCharPref("permissions.manager.defaultsUrl", "");
|
||||
let profile = do_get_profile();
|
||||
|
||||
// We need to execute a pm method to be sure that the DB is fully
|
||||
// initialized.
|
||||
|
@ -16,9 +16,9 @@ function GetPermissionsFile(profile) {
|
||||
}
|
||||
|
||||
add_task(async function test() {
|
||||
/* Create and set up the permissions database */
|
||||
let profile = do_get_profile();
|
||||
// Create and set up the permissions database.
|
||||
Services.prefs.setCharPref("permissions.manager.defaultsUrl", "");
|
||||
let profile = do_get_profile();
|
||||
|
||||
// We need to execute a pm method to be sure that the DB is fully
|
||||
// initialized.
|
||||
|
@ -16,9 +16,9 @@ function GetPermissionsFile(profile) {
|
||||
}
|
||||
|
||||
add_task(async function test() {
|
||||
/* Create and set up the permissions database */
|
||||
let profile = do_get_profile();
|
||||
// Create and set up the permissions database.
|
||||
Services.prefs.setCharPref("permissions.manager.defaultsUrl", "");
|
||||
let profile = do_get_profile();
|
||||
|
||||
// We need to execute a pm method to be sure that the DB is fully
|
||||
// initialized.
|
||||
|
@ -2,6 +2,7 @@
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
add_task(async function test() {
|
||||
Services.prefs.setCharPref("permissions.manager.defaultsUrl", "");
|
||||
// setup a profile directory
|
||||
var dir = do_get_profile();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user