Bug 820489 - reset social to disabled before removing providers in social tests. r=gavin

This commit is contained in:
Mark Hammond 2012-12-12 10:43:16 +11:00
Родитель 07491708b2
Коммит 39189fd9ba
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -150,6 +150,9 @@ function runSocialTestWithProvider(manifest, callback) {
Social.enabled = true;
registerCleanupFunction(function () {
// disable social before removing the providers to avoid providers
// being activated immediately before we get around to removing it.
Services.prefs.clearUserPref("social.enabled");
// if one test happens to fail, it is likely finishSocialTest will not
// be called, causing most future social tests to also fail as they
// attempt to add a provider which already exists - so work
@ -159,7 +162,6 @@ function runSocialTestWithProvider(manifest, callback) {
SocialService.removeProvider(m.origin, finish);
} catch (ex) {}
});
Services.prefs.clearUserPref("social.enabled");
});
function finishSocialTest() {
SocialService.removeProvider(provider.origin, finish);