Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Krinkle committed Jan 9, 2025
1 parent 2f8e3be commit db897a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/browsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,17 @@ function * getEdgePaths () {
}
}

// http://kb.mozillazine.org/About:config_entries
// https://github.com/sitespeedio/browsertime/blob/v23.5.0/lib/firefox/settings/firefoxPreferences.js
// https://github.com/airtap/the-last-browser-launcher/blob/v0.1.1/lib/launch/index.js
// https://github.com/karma-runner/karma-firefox-launcher/blob/v2.1.3/index.js
async function firefox (url, signal, logger) {
const profileDir = LocalBrowser.makeTempDir();
const args = [url, '-profile', profileDir, '-no-remote', '-wait-for-browser'];
if (!QTAP_DEBUG) {
args.push('-headless');
}

// http://kb.mozillazine.org/About:config_entries
// https://github.com/sitespeedio/browsertime/blob/v23.5.0/lib/firefox/settings/firefoxPreferences.js
// https://github.com/airtap/the-last-browser-launcher/blob/v0.1.1/lib/launch/index.js
// https://github.com/karma-runner/karma-firefox-launcher/blob/v2.1.3/index.js
logger.debug('firefox_prefs_create', 'Creating temporary prefs.js file');
fs.writeFileSync(path.join(profileDir, 'prefs.js'), createFirefoxPrefsJs({
'app.update.disabledForTesting': true, // Disable auto-updates
Expand Down Expand Up @@ -145,8 +145,8 @@ async function firefox (url, signal, logger) {
await LocalBrowser.spawn(getFirefoxPaths(), args, signal, logger);
}

// https://github.com/GoogleChrome/chrome-launcher/blob/main/docs/chrome-flags-for-tools.md
async function chromium (paths, url, signal, logger) {
// https://github.com/GoogleChrome/chrome-launcher/blob/main/docs/chrome-flags-for-tools.md
const dataDir = LocalBrowser.makeTempDir();
const args = [
'--user-data-dir=' + dataDir,
Expand Down
1 change: 1 addition & 0 deletions src/qtap.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function makeLogger (defaultChannel, printError, printDebug = null) {
.flat()
.map(param => typeof param === 'string' ? param : util.inspect(param, { colors: false }))
.join(' ');

function channel (prefix) {
return {
channel,
Expand Down

0 comments on commit db897a3

Please sign in to comment.