| OLD | NEW | 
|   1 /* |   1 /* | 
|   2  * This file is part of Adblock Plus <https://adblockplus.org/>, |   2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 
|   3  * Copyright (C) 2006-present eyeo GmbH |   3  * Copyright (C) 2006-present eyeo GmbH | 
|   4  * |   4  * | 
|   5  * Adblock Plus is free software: you can redistribute it and/or modify |   5  * Adblock Plus is free software: you can redistribute it and/or modify | 
|   6  * it under the terms of the GNU General Public License version 3 as |   6  * it under the terms of the GNU General Public License version 3 as | 
|   7  * published by the Free Software Foundation. |   7  * published by the Free Software Foundation. | 
|   8  * |   8  * | 
|   9  * Adblock Plus is distributed in the hope that it will be useful, |   9  * Adblock Plus is distributed in the hope that it will be useful, | 
|  10  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
|  39   const driver = new Builder() |  39   const driver = new Builder() | 
|  40         .forBrowser("firefox") |  40         .forBrowser("firefox") | 
|  41         .setFirefoxOptions(options) |  41         .setFirefoxOptions(options) | 
|  42         .build(); |  42         .build(); | 
|  43  |  43  | 
|  44   return executeScript(driver, "Firefox", script, scriptName, scriptArgs); |  44   return executeScript(driver, "Firefox", script, scriptName, scriptArgs); | 
|  45 } |  45 } | 
|  46  |  46  | 
|  47 module.exports = function(script, scriptName, ...scriptArgs) |  47 module.exports = function(script, scriptName, ...scriptArgs) | 
|  48 { |  48 { | 
|  49   return ensureFirefox(FIREFOX_VERSION).then(firefoxPath => |  49   return ensureFirefox(FIREFOX_VERSION) | 
|  50   { |  50     .then(firefoxPath => | 
|  51     return runScript(firefoxPath, script, scriptName, scriptArgs) |  51           runScript(firefoxPath, script, scriptName, scriptArgs)); | 
|  52       .then(result => result) |  | 
|  53       .catch(error => |  | 
|  54       { |  | 
|  55         throw error; |  | 
|  56       }); |  | 
|  57   }); |  | 
|  58 }; |  52 }; | 
| OLD | NEW |