www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 4f44cc10cecfbdcc48f28d0014bac934244377f3
parent 1472781ce437b1411fad9124a93a92a73b6842d5
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 30 Nov 2016 21:17:58 -0500

Avoid CustomizableUI warnings in console after resetDB() during tests

Diffstat:
Mtest/content/support.js | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/content/support.js b/test/content/support.js @@ -511,6 +511,8 @@ var removeDir = Zotero.Promise.coroutine(function* (dir) { * any that were set at startup */ function resetDB(options = {}) { + // Hack to avoid CustomizableUI warnings in console from icon.js + var toolbarIconAdded = Zotero.toolbarIconAdded; resetPrefs(); if (options.thisArg) { @@ -525,7 +527,10 @@ function resetDB(options = {}) { false, options ) - .then(() => Zotero.Schema.schemaUpdatePromise); + .then(() => { + Zotero.toolbarIconAdded = toolbarIconAdded; + return Zotero.Schema.schemaUpdatePromise; + }); } /**