зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1397744 - Show the Sync animation immediately after clicking the manual sync button. r=markh
MozReview-Commit-ID: AIBjAZZlYX6 --HG-- extra : rebase_source : 562023d6bfdb78aa2fad6c42948b57db8bc04f99
This commit is contained in:
Родитель
156c046ee3
Коммит
c602795751
|
@ -524,6 +524,7 @@ var gSync = {
|
|||
}
|
||||
const state = UIState.get();
|
||||
if (state.status == UIState.STATUS_SIGNED_IN) {
|
||||
this.updateSyncStatus({ syncing: true });
|
||||
setTimeout(() => Weave.Service.errorHandler.syncAndReportErrors(), 0);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
requestLongerTimeout(2);
|
||||
|
||||
let {SyncedTabs} = Cu.import("resource://services-sync/SyncedTabs.jsm", {});
|
||||
Cu.import("resource://services-sync/UIState.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "UITour", "resource:///modules/UITour.jsm");
|
||||
|
||||
|
@ -48,8 +49,12 @@ add_task(async function setup() {
|
|||
for (let id of ["sync-reauth-state", "sync-setup-state", "sync-syncnow-state"]) {
|
||||
initialObserverStates[id] = document.getElementById(id).hidden;
|
||||
}
|
||||
let origNotifyStateUpdated = UIState._internal.notifyStateUpdated;
|
||||
// Sync start-up will interfere with our tests, don't let UIState send UI updates.
|
||||
UIState._internal.notifyStateUpdated = () => {};
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
UIState._internal.notifyStateUpdated = origNotifyStateUpdated;
|
||||
SyncedTabs._internal = oldInternal;
|
||||
for (let [id, initial] of Object.entries(initialObserverStates)) {
|
||||
document.getElementById(id).hidden = initial;
|
||||
|
|
Загрузка…
Ссылка в новой задаче