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

Delta Between Two Patch Sets: test_runner.js

Issue 29720661: Issue 6391 - Allow running the browser unit tests with Firefox (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: README fixups Created May 18, 2018, 1:24 a.m.
Right Patch Set: Update Firefox version in README Created Aug. 3, 2018, 4:15 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/runners/webdriver.js ('k') | no next file » | 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 29 matching lines...) Expand all
40 chromium: chromiumProcess, 40 chromium: chromiumProcess,
41 firefox: firefoxProcess 41 firefox: firefoxProcess
42 }; 42 };
43 43
44 function configureRunners() 44 function configureRunners()
45 { 45 {
46 let runners = "BROWSER_TEST_RUNNERS" in process.env ? 46 let runners = "BROWSER_TEST_RUNNERS" in process.env ?
47 process.env.BROWSER_TEST_RUNNERS.split(",") : []; 47 process.env.BROWSER_TEST_RUNNERS.split(",") : [];
48 48
49 if (runners.length == 0) 49 if (runners.length == 0)
50 return ["chromium", "firefox"]; 50 return ["chromium_remote", "firefox"];
51 51
52 return runners.filter(runner => runnerDefinitions.hasOwnProperty(runner)); 52 return runners.filter(runner => runnerDefinitions.hasOwnProperty(runner));
53 } 53 }
54 54
55 let runnerProcesses = configureRunners(); 55 let runnerProcesses = configureRunners();
56 56
57 function addTestPaths(testPaths, recurse) 57 function addTestPaths(testPaths, recurse)
58 { 58 {
59 for (let testPath of testPaths) 59 for (let testPath of testPaths)
60 { 60 {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 Promise.resolve(runBrowserTests(runnerProcesses)).catch(error => 172 Promise.resolve(runBrowserTests(runnerProcesses)).catch(error =>
173 { 173 {
174 console.error("Failed running browser tests"); 174 console.error("Failed running browser tests");
175 console.error(error); 175 console.error(error);
176 }).then(() => 176 }).then(() =>
177 { 177 {
178 if (unitFiles.length) 178 if (unitFiles.length)
179 nodeunit.reporters.default.run(unitFiles); 179 nodeunit.reporters.default.run(unitFiles);
180 }); 180 });
LEFTRIGHT

Powered by Google App Engine
This is Rietveld