mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Bug 1439380 - Remove uses of Promise.jsm from mobile/android. r=nechen
MozReview-Commit-ID: KzrWz3K6vva --HG-- extra : rebase_source : 1b112deaf4b0cea1742ec1742981460513bd6242
This commit is contained in:
parent
4acbf7149c
commit
aa71c1a3b2
@ -6,10 +6,8 @@
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["Accounts"];
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Deprecated.jsm"); /* global Deprecated */
|
||||
ChromeUtils.import("resource://gre/modules/Messaging.jsm"); /* global Messaging */
|
||||
ChromeUtils.import("resource://gre/modules/Promise.jsm"); /* global Promise */
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm"); /* global Services */
|
||||
ChromeUtils.import("resource://gre/modules/Messaging.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
/**
|
||||
* A promise-based API for querying the existence of Sync accounts,
|
||||
@ -42,13 +40,6 @@ var Accounts = Object.freeze({
|
||||
return this._accountsExist("fxa");
|
||||
},
|
||||
|
||||
syncAccountsExist: function() {
|
||||
Deprecated.warning("The legacy Sync account type has been removed from Firefox for Android. " +
|
||||
"Please use `firefoxAccountsExist` instead.",
|
||||
"https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/Accounts.jsm");
|
||||
return Promise.resolve(false);
|
||||
},
|
||||
|
||||
anySyncAccountsExist: function() {
|
||||
return this._accountsExist("any");
|
||||
},
|
||||
|
@ -9,7 +9,6 @@ this.EXPORTED_SYMBOLS = [ "HomeProvider" ];
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Messaging.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Promise.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Sqlite.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Task.jsm");
|
||||
|
@ -16,16 +16,12 @@ Migrated from Robocop: https://bugzilla.mozilla.org/show_bug.cgi?id=1184186
|
||||
ChromeUtils.import("resource://gre/modules/Accounts.jsm");
|
||||
|
||||
add_task(function* () {
|
||||
let syncExists = yield Accounts.syncAccountsExist();
|
||||
info("Sync account exists? " + syncExists + "\n");
|
||||
let firefoxExists = yield Accounts.firefoxAccountsExist();
|
||||
info("Firefox account exists? " + firefoxExists + "\n");
|
||||
let anyExists = yield Accounts.anySyncAccountsExist();
|
||||
info("Any accounts exist? " + anyExists + "\n");
|
||||
|
||||
// Only one account should exist.
|
||||
ok(!syncExists || !firefoxExists, "at least one account does not exist");
|
||||
is(anyExists, firefoxExists || syncExists, "sync/firefox account existence consistent with any existence");
|
||||
is(anyExists, firefoxExists, "sync/firefox account existence consistent with any existence");
|
||||
|
||||
// TODO: How can this be cleaned up?
|
||||
// info("Launching setup.\n");
|
||||
|
Loading…
Reference in New Issue
Block a user