Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: test/browsers/firefox.js

Issue 29941694: Noissue - Fix *_BINARY=installed after update to selenium-webdriver 4.0 (Closed)
Patch Set: Fixed unrelated typo Created Nov. 10, 2018, 3:32 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/browsers/chromium.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 15 matching lines...) Expand all
26 // We need to require the geckodriver, 26 // We need to require the geckodriver,
27 // otherwise on Windows the geckodriver path is not added to process.env.PATH. 27 // otherwise on Windows the geckodriver path is not added to process.env.PATH.
28 require("geckodriver"); 28 require("geckodriver");
29 29
30 exports.platform = "gecko"; 30 exports.platform = "gecko";
31 exports.oldestCompatibleVersion = "57.0"; 31 exports.oldestCompatibleVersion = "57.0";
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().headless();
37 if (browserBinary != null)
38 options.setBinary(browserBinary);
39
37 let driver = new webdriver.Builder() 40 let driver = new webdriver.Builder()
38 .forBrowser("firefox") 41 .forBrowser("firefox")
39 .setFirefoxOptions(options) 42 .setFirefoxOptions(options)
40 .build(); 43 .build();
41 44
42 driver.execute(new Command("install addon") 45 driver.execute(new Command("install addon")
43 .setParameter("path", devenvPath) 46 .setParameter("path", devenvPath)
44 .setParameter("temporary", true)); 47 .setParameter("temporary", true));
45 48
46 return driver; 49 return driver;
47 }; 50 };
OLDNEW
« no previous file with comments | « test/browsers/chromium.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld