Add FilePicker module to replace nsIFilePicker

`nsIFilePicker::show()` is removed in Firefox 60 in favor of `open()`,
which takes a callback (and apparently has been preferred for a long
time).

There's no point switching to that, so this module is a version of
nsIFilePicker with an async `show()` that returns a promise and some
XPCOM-isms replaced (e.g., string paths instead of nsIFile).
This commit is contained in:
Dan Stillman 2019-08-24 04:25:51 -04:00
parent ee5302f893
commit 6f965251ed
13 changed files with 377 additions and 190 deletions

View file

@ -80,7 +80,7 @@ describe("Zotero.Sync.Data.Local", function() {
// extra1 functionality not used at the moment
it.skip("should prompt for data reset and allow to choose a new data directory", function* (){
sinon.stub(Zotero.DataDirectory, 'forceChange').returns(true);
sinon.stub(Zotero.DataDirectory, 'forceChange').returns(Zotero.Promise.resolve(true));
yield Zotero.Users.setCurrentUserID(1);
yield Zotero.Users.setCurrentUsername("A");