diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-04-23 15:32:23 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-04-23 15:32:23 -0400 |
commit | abe80cc31d5a40ebed743085011fbcda0c1a9a10 (patch) | |
tree | fb3762f06b84745b182af281abb107b95a9fcf01 /mobile/android/tests/browser/chrome/head_search.js | |
parent | 63295d0087eb58a6eb34cad324c4c53d1b220491 (diff) | |
download | UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.gz UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.lz UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.xz UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.zip |
Issue #1053 - Drop support Android and remove Fennec - Part 1a: Remove mobile/android
Diffstat (limited to 'mobile/android/tests/browser/chrome/head_search.js')
-rw-r--r-- | mobile/android/tests/browser/chrome/head_search.js | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/mobile/android/tests/browser/chrome/head_search.js b/mobile/android/tests/browser/chrome/head_search.js deleted file mode 100644 index b6fb94449..000000000 --- a/mobile/android/tests/browser/chrome/head_search.js +++ /dev/null @@ -1,46 +0,0 @@ -// Bits and pieces copied from toolkit/components/search/tests/xpcshell/head_search.js - -var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components; - -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/Task.jsm"); - -/** - * Adds test engines and returns a promise resolved when they are installed. - * - * The engines are added in the given order. - * - * @param aItems - * Array of objects with the following properties: - * { - * name: Engine name, used to wait for it to be loaded. - * details: Array containing the parameters of addEngineWithDetails, - * except for the engine name. Alternative to xmlFileName. - * } - */ -var addTestEngines = Task.async(function* (aItems) { - let engines = []; - - for (let item of aItems) { - yield new Promise((resolve, reject) => { - Services.obs.addObserver(function obs(subject, topic, data) { - try { - let engine = subject.QueryInterface(Ci.nsISearchEngine); - if (data != "engine-added" || engine.name != item.name) { - return; - } - - Services.obs.removeObserver(obs, "browser-search-engine-modified"); - engines.push(engine); - resolve(); - } catch (ex) { - reject(ex); - } - }, "browser-search-engine-modified", false); - - Services.search.addEngineWithDetails(item.name, ...item.details); - }); - } - - return engines; -}); |