From 3546f5ed59c6496d5680a88d8e7313e951a94521 Mon Sep 17 00:00:00 2001 From: Kit Cambridge Date: Thu, 20 Oct 2016 08:43:11 -0700 Subject: [PATCH] Bug 1311739 - Silence `serverURL` pref warnings in push tests. r=dragana MozReview-Commit-ID: 9Peorbb5pFS --HG-- extra : rebase_source : b1050f209f8edbbf5aefd5cac91a94ee56de1620 --- dom/push/PushService.jsm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dom/push/PushService.jsm b/dom/push/PushService.jsm index 80e112f0e66e..373807024809 100644 --- a/dom/push/PushService.jsm +++ b/dom/push/PushService.jsm @@ -492,6 +492,7 @@ this.PushService = { this._setState(PUSH_SERVICE_ACTIVATING); + prefs.observe("serverURL", this); Services.obs.addObserver(this, "quit-application", false); if (options.serverURI) { @@ -503,8 +504,6 @@ this.PushService = { } else { // This is only used for testing. Different tests require connecting to // slightly different URLs. - prefs.observe("serverURL", this); - this._stateChangeProcessEnqueue(_ => this._changeServerURL(prefs.get("serverURL"), STARTING_SERVICE_EVENT)); }