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

Delta Between Two Patch Sets: test/browsers/firefox.js

Issue 29866577: Issue 6887 - add Chrome to "npm test" (Closed)
Left Patch Set: Created Sept. 1, 2018, 11:51 a.m.
Right Patch Set: Removed unused this.platform Created Sept. 1, 2018, 3:12 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « test/browsers/chromium.js ('k') | test/firefox.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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 };
LEFTRIGHT

Powered by Google App Engine
This is Rietveld