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

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

Issue 29938555: Noissue - Upgrade to selenium-webdriver 4.0.0-alpha (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Nov. 6, 2018, 8: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
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(); 36 let options = new firefox.Options().setBinary(browserBinary).headless();
37 options.setBinary(browserBinary);
38 options.headless();
39
40 let driver = new webdriver.Builder() 37 let driver = new webdriver.Builder()
41 .forBrowser("firefox") 38 .forBrowser("firefox")
42 .setFirefoxOptions(options) 39 .setFirefoxOptions(options)
43 .build(); 40 .build();
44 41
45 let cmd = new Command("moz-install-web-ext") 42 let cmd = new Command("install addon")
46 .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.
47 .setParameter("temporary", true); 44 .setParameter("temporary", true);
48 45
49 driver.getExecutor().defineCommand( 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.
50 cmd.getName(), "POST",
51 "/session/:sessionId/moz/addon/install"
52 );
53 driver.schedule(cmd, `installWebExt(${devenvPath})`);
54 47
55 return driver; 48 return driver;
56 }; 49 };
OLDNEW

Powered by Google App Engine
This is Rietveld