| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 21 matching lines...) Expand all Loading... | |
| 32 exports.ensureBrowser = ensureFirefox; | 32 exports.ensureBrowser = ensureFirefox; |
| 33 | 33 |
| 34 exports.getDriver = function(browserBinary, devenvPath) | 34 exports.getDriver = function(browserBinary, devenvPath) |
| 35 { | 35 { |
| 36 let options = new firefox.Options().setBinary(browserBinary).headless(); | 36 let options = new firefox.Options().setBinary(browserBinary).headless(); |
| 37 let driver = new webdriver.Builder() | 37 let driver = new webdriver.Builder() |
| 38 .forBrowser("firefox") | 38 .forBrowser("firefox") |
| 39 .setFirefoxOptions(options) | 39 .setFirefoxOptions(options) |
| 40 .build(); | 40 .build(); |
| 41 | 41 |
| 42 let cmd = new Command("install addon") | 42 driver.execute(new Command("install addon") |
| 43 .setParameter("path", devenvPath) | 43 .setParameter("path", devenvPath) |
|
Sebastian Noack
2018/11/06 09:02:33
Nit: The indentation seems to be off here by 2 spa
hub
2018/11/07 17:13:37
Done.
| |
| 44 .setParameter("temporary", true); | 44 .setParameter("temporary", true)); |
| 45 | |
| 46 driver.execute(cmd); | |
|
Sebastian Noack
2018/11/06 09:02:33
Nit: I think we don't need the cmd variable anymor
hub
2018/11/07 17:13:37
Done.
| |
| 47 | 45 |
| 48 return driver; | 46 return driver; |
| 49 }; | 47 }; |
| LEFT | RIGHT |