Bug 1369092 - Listen to onverified events in UIState. r=markh
authorEdouard Oger <eoger@fastmail.com>
Wed, 31 May 2017 12:02:28 -0400
changeset 361843 0d9702f4acd2b5e3c6393a6de3e872516c7089de
parent 361842 6c3dd2bfed0ae70695807a49150808a85d7fc368
child 361844 9c69d0681cd6eebb84ede09b15f9866b0397cad0
push id31945
push userryanvm@gmail.com
push dateThu, 01 Jun 2017 20:42:17 +0000
treeherdermozilla-central@15e32469eb04 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh
bugs1369092
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1369092 - Listen to onverified events in UIState. r=markh MozReview-Commit-ID: 8nfmpaz9obF
services/sync/modules/UIState.jsm
services/sync/tests/unit/test_uistate.js
--- a/services/sync/modules/UIState.jsm
+++ b/services/sync/modules/UIState.jsm
@@ -25,16 +25,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 const TOPICS = [
   "weave:service:login:change",
   "weave:service:login:error",
   "weave:service:ready",
   "weave:service:sync:start",
   "weave:service:sync:finish",
   "weave:service:sync:error",
+  "fxaccounts:onverified",
   "fxaccounts:onlogin", // Defined in FxAccountsCommon, pulling it is expensive.
   "fxaccounts:onlogout",
   "fxaccounts:profilechange",
 ];
 
 const ON_UPDATE = "sync-ui-state:update"
 
 const STATUS_NOT_CONFIGURED = "not_configured";
--- a/services/sync/tests/unit/test_uistate.js
+++ b/services/sync/tests/unit/test_uistate.js
@@ -164,18 +164,19 @@ add_task(async function test_refreshStat
   loginFailed.restore();
   UIStateInternal.fxAccounts = fxAccountsOrig;
 });
 
 add_task(async function test_observer_refreshState() {
   let refreshState = sinon.spy(UIStateInternal, "refreshState");
 
   let shouldRefresh = ["weave:service:login:change", "weave:service:login:error",
-                       "weave:service:ready", "fxaccounts:onlogin",
-                       "fxaccounts:onlogout", "fxaccounts:profilechange"];
+                       "weave:service:ready", "fxaccounts:onverified",
+                       "fxaccounts:onlogin", "fxaccounts:onlogout",
+                       "fxaccounts:profilechange"];
 
   for (let topic of shouldRefresh) {
     let uiUpdateObserved = observeUIUpdate();
     Services.obs.notifyObservers(null, topic);
     await uiUpdateObserved;
     ok(refreshState.calledOnce);
     refreshState.reset();
   }