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 14 matching lines...) Expand all Loading... |
25 const {ensureFirefox} = require("../../adblockpluscore/test/runners/" + | 25 const {ensureFirefox} = require("../../adblockpluscore/test/runners/" + |
26 "firefox_download"); | 26 "firefox_download"); |
27 | 27 |
28 exports.platform = "gecko"; | 28 exports.platform = "gecko"; |
29 | 29 |
30 exports.ensureBrowser = function() | 30 exports.ensureBrowser = function() |
31 { | 31 { |
32 return ensureFirefox(FIREFOX_VERSION); | 32 return ensureFirefox(FIREFOX_VERSION); |
33 }; | 33 }; |
34 | 34 |
35 exports.getDriver = function(browserBinary, devenvPathAbsolute) | 35 exports.getDriver = function(browserBinary, devenvPath) |
36 { | 36 { |
37 let binary = new firefox.Binary(browserBinary); | 37 let binary = new firefox.Binary(browserBinary); |
38 binary.addArguments("-headless"); | 38 binary.addArguments("-headless"); |
39 | 39 |
40 let driver = new webdriver.Builder() | 40 let driver = new webdriver.Builder() |
41 .forBrowser("firefox") | 41 .forBrowser("firefox") |
42 .setFirefoxOptions(new firefox.Options().setBinary(binary)) | 42 .setFirefoxOptions(new firefox.Options().setBinary(binary)) |
43 .build(); | 43 .build(); |
44 | 44 |
45 let cmd = new Command("moz-install-web-ext") | 45 let cmd = new Command("moz-install-web-ext") |
46 .setParameter("path", devenvPathAbsolute) | 46 .setParameter("path", devenvPath) |
47 .setParameter("temporary", true); | 47 .setParameter("temporary", true); |
48 | 48 |
49 driver.getExecutor().defineCommand( | 49 driver.getExecutor().defineCommand( |
50 cmd.getName(), "POST", | 50 cmd.getName(), "POST", |
51 "/session/:sessionId/moz/addon/install" | 51 "/session/:sessionId/moz/addon/install" |
52 ); | 52 ); |
53 driver.schedule(cmd, `installWebExt(${devenvPathAbsolute})`); | 53 driver.schedule(cmd, `installWebExt(${devenvPath})`); |
54 | 54 |
55 return driver; | 55 return driver; |
56 }; | 56 }; |
LEFT | RIGHT |