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

Delta Between Two Patch Sets: test/browsers/chromium.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/all.js ('k') | test/browsers/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 18 matching lines...) Expand all
29 const {ensureChromium} = require("../../adblockpluscore/test/runners/" + 29 const {ensureChromium} = require("../../adblockpluscore/test/runners/" +
30 "chromium_download"); 30 "chromium_download");
31 31
32 exports.platform = "chrome"; 32 exports.platform = "chrome";
33 33
34 exports.ensureBrowser = function() 34 exports.ensureBrowser = function()
35 { 35 {
36 return ensureChromium(CHROMIUM_REVISION); 36 return ensureChromium(CHROMIUM_REVISION);
37 }; 37 };
38 38
39 exports.getDriver = function(browserBinary, devenvPathAbsolute) 39 exports.getDriver = function(browserBinary, devenvPath)
Sebastian Noack 2018/09/01 12:26:34 Nit: I don't think that the path is absolute is an
tlucas 2018/09/01 14:46:44 Done.
40 { 40 {
41 let options = new chrome.Options() 41 let options = new chrome.Options()
42 .setChromeBinaryPath(browserBinary) 42 .setChromeBinaryPath(browserBinary)
43 .addArguments("--no-sandbox") 43 .addArguments("--no-sandbox")
44 .addArguments(`load-extension=${devenvPathAbsolute}`); 44 .addArguments(`load-extension=${devenvPath}`);
45 45
46 return new webdriver.Builder() 46 return new webdriver.Builder()
47 .forBrowser("chrome") 47 .forBrowser("chrome")
48 .setChromeOptions(options) 48 .setChromeOptions(options)
49 .build(); 49 .build();
50 }; 50 };
LEFTRIGHT

Powered by Google App Engine
This is Rietveld