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

Side by Side Diff: test/runners/firefox_download.js

Issue 29892576: Noissue - Fix Firefox executable path for Windows (Closed)
Patch Set: Created Sept. 26, 2018, 7:44 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 default: 111 default:
112 throw new Error("Unexpected platform"); 112 throw new Error("Unexpected platform");
113 } 113 }
114 } 114 }
115 115
116 function getFirefoxExecutable(browserDir) 116 function getFirefoxExecutable(browserDir)
117 { 117 {
118 switch (platform) 118 switch (platform)
119 { 119 {
120 case "win32": 120 case "win32":
121 return path.join(browserDir, "firefox.exe"); 121 return path.join(browserDir, "core", "firefox.exe");
122 case "linux": 122 case "linux":
123 return path.join(browserDir, "firefox", "firefox"); 123 return path.join(browserDir, "firefox", "firefox");
124 case "darwin": 124 case "darwin":
125 return path.join(browserDir, "Firefox.app", "Contents", 125 return path.join(browserDir, "Firefox.app", "Contents",
126 "MacOS", "firefox"); 126 "MacOS", "firefox");
127 default: 127 default:
128 throw new Error("Unexpected platform"); 128 throw new Error("Unexpected platform");
129 } 129 }
130 } 130 }
131 131
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return download(url, archive); 171 return download(url, archive);
172 } 172 }
173 console.info(`Reusing cached archive ${archive}`); 173 console.info(`Reusing cached archive ${archive}`);
174 }) 174 })
175 .then(() => extractArchive(archive, browserDir)) 175 .then(() => extractArchive(archive, browserDir))
176 .then(() => browserDir); 176 .then(() => browserDir);
177 }).then(dir => getFirefoxExecutable(dir)); 177 }).then(dir => getFirefoxExecutable(dir));
178 } 178 }
179 179
180 module.exports.ensureFirefox = ensureFirefox; 180 module.exports.ensureFirefox = ensureFirefox;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld