From 39189fd9ba082e4467e777c366bef32d903a9ce0 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Wed, 12 Dec 2012 10:43:16 +1100 Subject: [PATCH] Bug 820489 - reset social to disabled before removing providers in social tests. r=gavin --- browser/base/content/test/head.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browser/base/content/test/head.js b/browser/base/content/test/head.js index df6a6897fb15..a78fead2e019 100644 --- a/browser/base/content/test/head.js +++ b/browser/base/content/test/head.js @@ -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);