Skip to content

Commit b26a0af

Browse files
committed
WIP support for running tests with Firefox Aurora
1 parent 656876a commit b26a0af

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

test/selenium-init.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ function unzip(dir, file) {
4646
var destDir = 'test_tools';
4747
var stableDestDir = 'test_tools/stable';
4848
var betaDestDir = 'test_tools/beta';
49+
var auroraDestDir = 'test_tools/aurora';
4950

5051
try {
5152
fs.mkdirSync(destDir);
@@ -62,6 +63,11 @@ try {
6263
} catch (e) {
6364
}
6465

66+
try {
67+
fs.mkdirSync(auroraDestDir);
68+
} catch (e) {
69+
}
70+
6571
if (process.platform !== 'linux' && process.platform !== 'darwin') {
6672
throw new Error('Platform ' + process.platform + ' not supported.');
6773
}
@@ -204,6 +210,10 @@ function downloadFirefoxBeta() {
204210
return downloadFirefoxFromDMO('firefox-beta-latest', betaDestDir);
205211
}
206212

213+
function downloadFirefoxAurora() {
214+
return downloadFirefoxFromDMO('firefox-aurora-latest', auroraDestDir);
215+
}
216+
207217
// Download Chrome Canary
208218

209219
var chromePlatform, chromeZipPlatform;
@@ -273,6 +283,7 @@ module.exports = {
273283
downloadFirefoxNightly: downloadFirefoxNightly,
274284
downloadFirefoxRelease: downloadFirefoxRelease,
275285
downloadFirefoxBeta: downloadFirefoxBeta,
286+
downloadFirefoxAurora: downloadFirefoxAurora,
276287
downloadChromiumNightly: downloadChromiumNightly,
277288
downloadChromeDriver: downloadChromeDriver,
278289
};

test/testSelenium.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ suite('selenium', function() {
3636

3737
this.timeout(180000);
3838

39-
var firefoxStableBinaryPath, firefoxBetaBinaryPath, firefoxNightlyBinaryPath, chromeBinaryPath;
39+
var firefoxStableBinaryPath, firefoxBetaBinaryPath, firefoxAuroraBinaryPath, firefoxNightlyBinaryPath, chromeBinaryPath;
4040
var server, driver;
4141

4242
function runTest(params) {
@@ -46,6 +46,10 @@ suite('selenium', function() {
4646
} else if (params.browser === 'firefox-beta') {
4747
params.browser = 'firefox';
4848
firefoxBinaryPath = firefoxBetaBinaryPath;
49+
} else if (params.browser === 'firefox-aurora') {
50+
params.browser = 'firefox';
51+
firefoxBinaryPath = firefoxAuroraBinaryPath;
52+
process.env.SELENIUM_MARIONETTE = true;
4953
}
5054

5155
process.env.SELENIUM_BROWSER = params.browser;
@@ -122,6 +126,14 @@ suite('selenium', function() {
122126

123127
promises.push(seleniumInit.downloadFirefoxBeta());
124128

129+
/*if (process.platform === 'linux') {
130+
firefoxAuroraBinaryPath = 'test_tools/aurora/firefox/firefox-bin';
131+
} else if (process.platform === 'darwin') {
132+
firefoxAuroraBinaryPath = 'test_tools/aurora/Firefox.app/Contents/MacOS/firefox-bin';
133+
}
134+
135+
promises.push(seleniumInit.downloadFirefoxAurora());*/
136+
125137
if (process.platform === 'linux') {
126138
firefoxNightlyBinaryPath = 'test_tools/firefox/firefox-bin';
127139
} else if (process.platform === 'darwin') {
@@ -156,6 +168,7 @@ suite('selenium', function() {
156168
console.log('Using Firefox: ' + firefoxStableBinaryPath);
157169
console.log('Version: ' + childProcess.execSync(firefoxStableBinaryPath + ' --version'));
158170
console.log('Beta Version: ' + childProcess.execSync(firefoxBetaBinaryPath + ' --version'));
171+
console.log('Aurora Version: ' + childProcess.execSync(firefoxAuroraBinaryPath + ' --version'));
159172
} catch (e) {}
160173

161174
if (process.env.GCM_API_KEY && !fs.existsSync(chromeBinaryPath)) {

0 commit comments

Comments
 (0)