From 4f44cc10cecfbdcc48f28d0014bac934244377f3 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 30 Nov 2016 21:17:58 -0500 Subject: [PATCH] Avoid CustomizableUI warnings in console after resetDB() during tests --- test/content/support.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/content/support.js b/test/content/support.js index 0093a3d634..e5a9dde03e 100644 --- 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; + }); } /**