Bug 1392874 - Force gSync initialization in browser_sync.js test. r?markh
MozReview-Commit-ID: 9ZEK4dc6QEe
--- a/browser/base/content/test/sync/browser_sync.js
+++ b/browser/base/content/test/sync/browser_sync.js
@@ -1,13 +1,18 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
+add_task(function setup() {
+ // gSync.init() is called in a requestIdleCallback. Force its initialization.
+ gSync.init();
+});
+
add_task(async function test_ui_state_notification_calls_updateAllUI() {
let called = false;
let updateAllUI = gSync.updateAllUI;
gSync.updateAllUI = () => { called = true; };
Services.obs.notifyObservers(null, UIState.ON_UPDATE);
ok(called);