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 21 matching lines...) Expand all Loading... |
32 // The Chromium version is a build number, quite obscure. | 32 // The Chromium version is a build number, quite obscure. |
33 // Chromium 63.0.3239.x is 508578 | 33 // Chromium 63.0.3239.x is 508578 |
34 // Chromium 65.0.3325.0 is 530368 | 34 // Chromium 65.0.3325.0 is 530368 |
35 // We currently want Chromiun 63, as we still support it and that's the | 35 // We currently want Chromiun 63, as we still support it and that's the |
36 // loweset version that supports WebDriver. | 36 // loweset version that supports WebDriver. |
37 exports.oldestCompatibleVersion = 508578; | 37 exports.oldestCompatibleVersion = 508578; |
38 | 38 |
39 exports.getDriver = function(browserBinary, devenvPath) | 39 exports.getDriver = function(browserBinary, devenvPath) |
40 { | 40 { |
41 let options = new chrome.Options() | 41 let options = new chrome.Options() |
42 .setChromeBinaryPath(browserBinary) | |
43 .addArguments("--no-sandbox") | 42 .addArguments("--no-sandbox") |
44 .addArguments(`load-extension=${devenvPath}`); | 43 .addArguments(`load-extension=${devenvPath}`); |
45 | 44 |
| 45 if (browserBinary != null) |
| 46 options.setChromeBinaryPath(browserBinary); |
| 47 |
46 return new webdriver.Builder() | 48 return new webdriver.Builder() |
47 .forBrowser("chrome") | 49 .forBrowser("chrome") |
48 .setChromeOptions(options) | 50 .setChromeOptions(options) |
49 .build(); | 51 .build(); |
50 }; | 52 }; |
OLD | NEW |