From bc2bf61dbcc175e255e4c3a38cb3c1ee645d06f8 Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Mon, 29 Feb 2016 16:09:36 +0100 Subject: [PATCH 1/9] Remove phantomjs from darwin, linux checker should work --- lib/darwin/index.js | 1 - lib/darwin/phantomjs.js | 32 -------------------------------- lib/darwin/util.js | 14 -------------- 3 files changed, 47 deletions(-) delete mode 100644 lib/darwin/phantomjs.js diff --git a/lib/darwin/index.js b/lib/darwin/index.js index c92c4ca..c3bf668 100644 --- a/lib/darwin/index.js +++ b/lib/darwin/index.js @@ -4,4 +4,3 @@ exports.chrome = exports[ 'google-chrome' ] = require( './chrome' ); exports.chromium = require( './chromium' ); exports.canary = exports[ 'chrome-canary' ] = exports[ 'google-chrome-canary' ] = require( './canary' ); exports.opera = require( './opera' ); -exports.phantomjs = require( './phantomjs' ); diff --git a/lib/darwin/phantomjs.js b/lib/darwin/phantomjs.js deleted file mode 100644 index 8dca831..0000000 --- a/lib/darwin/phantomjs.js +++ /dev/null @@ -1,32 +0,0 @@ -var util = require( './util' ); - -exports.path = path; -exports.version = version; - -function path(callback ) { - util.findBin( 'phantomjs', function( err, path ) { - if ( err ) { - callback( err, null ); - } else if ( path ) { - callback( null, path ); - } else { - callback( 'not installed' ); - } - }); -} - -function version(callback ) { - path( function(err, path ) { - if ( err || !path ) { - callback( err, null ); - return; - } - util.getBinVersion( 'phantomjs', function( err, version ) { - if ( err || !version ) { - callback( err, null ); - } else { - callback( null, version ); - } - }); - }); -} \ No newline at end of file diff --git a/lib/darwin/util.js b/lib/darwin/util.js index c764f8e..83bff9f 100644 --- a/lib/darwin/util.js +++ b/lib/darwin/util.js @@ -8,8 +8,6 @@ exports.parse = parse; exports.find = find; exports.getInfoPath = getInfoPath; exports.getInfoKey = getInfoKey; -exports.findBin = findBin; -exports.getBinVersion = getBinVersion; var infoCache = Object.create(null); @@ -50,18 +48,6 @@ function find( id, callback ) { } ); } -function findBin(id, callback) { - exec('which ' + id, function( err, path ) { - callback( err, path ? path.trim() : path ); - }); -} - -function getBinVersion(id, callback) { - exec(id + ' --version', function( err, version ) { - callback( err, version ? version.trim() : version ); - }); -} - function getInfoPath( p ) { return path.join( p, 'Contents', 'Info.plist' ); } From 42d8331b69da7b9343b4b905d22da6f5eb7f36c6 Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Mon, 29 Feb 2016 16:37:36 +0100 Subject: [PATCH 2/9] Remove some unused function, push plist exist check to parse() --- lib/darwin/chromium.js | 46 ++++++++----------- lib/darwin/firefox.js | 67 ++++++++++++--------------- lib/darwin/util.js | 102 ++++++++++++++++++++--------------------- 3 files changed, 98 insertions(+), 117 deletions(-) diff --git a/lib/darwin/chromium.js b/lib/darwin/chromium.js index 227bd3e..f78ac3d 100644 --- a/lib/darwin/chromium.js +++ b/lib/darwin/chromium.js @@ -1,35 +1,27 @@ -var util = require( './util' ), - currentPath; +var util = require('./util'), + currentPath; -function getPath( callback ) { - if ( currentPath ) { - return callback( null, currentPath ); - } +function getPath(callback) { + if (currentPath) { + return callback(null, currentPath); + } - util.find( 'org.chromium.Chromium', function( err, path ) { - currentPath = path; - callback( err, currentPath ); - } ); + util.find('org.chromium.Chromium', function (err, path) { + currentPath = path; + callback(err, currentPath); + }); } -function getVersion( callback ) { - getPath( function( err, path ) { - if ( err ) { - return callback( err, null ); - } +function getVersion(callback) { + getPath(function (err, path) { + if (err) { + return callback(err, null); + } - var pl = util.getInfoPath( path ); - - util.exists( pl, function( exists ) { - if ( exists ) { - util.parse( pl, function( err, data ) { - callback( err, data.CFBundleShortVersionString ); - } ); - } else { - callback( 'not installed', null ); - } - } ); - } ); + util.parse(util.getInfoPath(path), function (err, data) { + callback(err, data.CFBundleShortVersionString); + }); + }); } exports.path = getPath; diff --git a/lib/darwin/firefox.js b/lib/darwin/firefox.js index c4ce5ae..1f2d8a1 100644 --- a/lib/darwin/firefox.js +++ b/lib/darwin/firefox.js @@ -1,42 +1,33 @@ -var path = require( 'path' ), - util = require( './util' ); +var path = require('path'), + util = require('./util'); //Fetch all known version of Firefox on the host machine -exports.all = function( callback ) { - var installed = [], - pending = 0, - check = function() { - if ( !pending ) { - callback( null, installed ); - } - }; +exports.all = function (callback) { + var installed = [], + pending = 0, + check = function () { + if (!pending) { + callback(null, installed); + } + }; - util.find( 'org.mozilla.firefox', function( err, p ) { - if ( p ) { - var items = p.split( '\n' ); - pending = items.length; - items.forEach( function( loc ) { - var infoPath = util.getInfoPath( loc ); - - util.exists( infoPath, function( exits ) { - if ( exits ) { - util.parse( infoPath, function( err, data ) { - var o = { - version: data.CFBundleShortVersionString, - path: path.join( loc, 'Contents/MacOS/firefox-bin' ) - }; - installed.push( o ); - pending--; - check(); - } ); - } else { - pending--; - check(); - } - } ); - } ); - } else { - callback( 'not installed' ); - } - } ); + util.find('org.mozilla.firefox', function (err, p) { + if (p) { + var items = p.split('\n'); + pending = items.length; + items.forEach(function (loc) { + util.parse(util.getInfoPath(loc), function (err, data) { + var o = { + version: data['CFBundleShortVersionString'], + path: path.join(loc, 'Contents/MacOS/firefox-bin') + }; + installed.push(o); + pending--; + check(); + }); + }); + } else { + callback('not installed'); + } + }); }; diff --git a/lib/darwin/util.js b/lib/darwin/util.js index 83bff9f..be4b01d 100644 --- a/lib/darwin/util.js +++ b/lib/darwin/util.js @@ -1,7 +1,7 @@ -var exec = require( 'child_process' ).exec, - fs = require( 'fs' ), - path = require( 'path' ), - plist = require( 'plist' ); +var exec = require('child_process').exec, + fs = require('fs'), + path = require('path'), + plist = require('plist'); exports.exists = fs.exists; exports.parse = parse; @@ -10,64 +10,62 @@ exports.getInfoPath = getInfoPath; exports.getInfoKey = getInfoKey; var infoCache = Object.create(null); +var bundleCache = Object.create(null); -function parse( file, callback ) { - if (infoCache[file] !== void 0) { - return callback(null, infoCache[file]); - } - fs.readFile( file, { - encoding: 'utf8' - }, function( err, data ) { - if ( !err ) { - infoCache[ file ] = data = plist.parse( data ); - } +function parse(file, callback) { + if (!infoCache[file]) { + return callback(null, infoCache[file]); + } - callback( err, data ); - } ); -} + fs.exists(file, function(exists) { + if (!exists) { + return callback('cannot parse nonexistant plist', null); + } -var bundleCache = Object.create(null); + fs.readFile(file, { + encoding: 'utf8' + }, function (err, data) { + if (!err) { + infoCache[file] = data = plist.parse(data); + } -function find( id, callback ) { - if (bundleCache[id] !== void 0) { - return callback(null, bundleCache[id]); - } - var pathQuery = 'mdfind "kMDItemCFBundleIdentifier=="' + id + '"" | head -1'; + callback(err, data); + }); + }); +} - exec( pathQuery, function( err, stdout ) { - var loc = stdout.trim(); +function find(id, callback) { + if (bundleCache[id]) { + return callback(null, bundleCache[id]); + } - if ( loc === '' ) { - loc = null; - err = 'not installed'; - } else { - bundleCache[id] = loc; - } + var pathQuery = 'mdfind kMDItemCFBundleIdentifier=="' + id + '" | head -1'; + exec(pathQuery, function (err, stdout) { + var loc = stdout.trim(); - callback( err, loc ); - } ); -} + if (loc === '') { + loc = null; + err = 'not installed'; + } else { + bundleCache[id] = loc; + } -function getInfoPath( p ) { - return path.join( p, 'Contents', 'Info.plist' ); + callback(err, loc); + }); } -function getInfoKey( bundleId, key, callback ) { - find( bundleId, function( err, path ) { - if ( err ) { - return callback( err, null ); - } +function getInfoPath(p) { + return path.join(p, 'Contents', 'Info.plist'); +} - var pl = getInfoPath( path ); +function getInfoKey(bundleId, key, callback) { + find(bundleId, function (err, path) { + if (err) { + return callback(err, null); + } - fs.exists( pl, function( exists ) { - if ( exists ) { - parse( pl, function( err, data ) { - callback( err, data[key] ); - } ); - } else { - callback( 'not installed', null ); - } - } ); - } ); + parse(getInfoPath(path), function (err, data) { + callback(err, data[key]); + }); + }); } From 23f0b8e6c98043bc3859b9c00beac477439cbeec Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Mon, 29 Feb 2016 16:40:10 +0100 Subject: [PATCH 3/9] Properly handle err on plist parse --- lib/darwin/chromium.js | 6 +++++- lib/darwin/firefox.js | 12 +++++++----- lib/darwin/util.js | 8 ++++++-- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/lib/darwin/chromium.js b/lib/darwin/chromium.js index f78ac3d..4ad75d1 100644 --- a/lib/darwin/chromium.js +++ b/lib/darwin/chromium.js @@ -19,7 +19,11 @@ function getVersion(callback) { } util.parse(util.getInfoPath(path), function (err, data) { - callback(err, data.CFBundleShortVersionString); + if (err) { + return callback(err, null); + } + + callback(null, data['CFBundleShortVersionString']); }); }); } diff --git a/lib/darwin/firefox.js b/lib/darwin/firefox.js index 1f2d8a1..50f9f1e 100644 --- a/lib/darwin/firefox.js +++ b/lib/darwin/firefox.js @@ -17,11 +17,13 @@ exports.all = function (callback) { pending = items.length; items.forEach(function (loc) { util.parse(util.getInfoPath(loc), function (err, data) { - var o = { - version: data['CFBundleShortVersionString'], - path: path.join(loc, 'Contents/MacOS/firefox-bin') - }; - installed.push(o); + if (!err) { + installed.push({ + version: data['CFBundleShortVersionString'], + path: path.join(loc, 'Contents/MacOS/firefox-bin') + }); + } + pending--; check(); }); diff --git a/lib/darwin/util.js b/lib/darwin/util.js index be4b01d..6d2efb1 100644 --- a/lib/darwin/util.js +++ b/lib/darwin/util.js @@ -19,7 +19,7 @@ function parse(file, callback) { fs.exists(file, function(exists) { if (!exists) { - return callback('cannot parse nonexistant plist', null); + return callback('cannot parse non-existant plist', null); } fs.readFile(file, { @@ -65,7 +65,11 @@ function getInfoKey(bundleId, key, callback) { } parse(getInfoPath(path), function (err, data) { - callback(err, data[key]); + if (err) { + return callback(err, null); + } + + callback(null, data[key]); }); }); } From 8cc2a9b2a7921b98aacf03fbb5a8e4930ebfc290 Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Mon, 29 Feb 2016 16:43:36 +0100 Subject: [PATCH 4/9] Forgot how caches work, apparently --- lib/darwin/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/darwin/util.js b/lib/darwin/util.js index 6d2efb1..83c43e0 100644 --- a/lib/darwin/util.js +++ b/lib/darwin/util.js @@ -13,7 +13,7 @@ var infoCache = Object.create(null); var bundleCache = Object.create(null); function parse(file, callback) { - if (!infoCache[file]) { + if (infoCache[file]) { return callback(null, infoCache[file]); } From d71fa27db65d2f58da847e8960aab2109a48f115 Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Mon, 29 Feb 2016 16:48:36 +0100 Subject: [PATCH 5/9] chromium should use `util` --- lib/darwin/chromium.js | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/lib/darwin/chromium.js b/lib/darwin/chromium.js index 4ad75d1..9cac216 100644 --- a/lib/darwin/chromium.js +++ b/lib/darwin/chromium.js @@ -1,32 +1,6 @@ var util = require('./util'), - currentPath; + CHROMIUM_ID = 'org.chromium.Chromium', + CHROMIUM_VERSION = 'CFBundleShortVersionString'; -function getPath(callback) { - if (currentPath) { - return callback(null, currentPath); - } - - util.find('org.chromium.Chromium', function (err, path) { - currentPath = path; - callback(err, currentPath); - }); -} - -function getVersion(callback) { - getPath(function (err, path) { - if (err) { - return callback(err, null); - } - - util.parse(util.getInfoPath(path), function (err, data) { - if (err) { - return callback(err, null); - } - - callback(null, data['CFBundleShortVersionString']); - }); - }); -} - -exports.path = getPath; -exports.version = getVersion; +exports.path = util.find.bind(null, CHROMIUM_ID); +exports.version = util.getInfoKey.bind(null, CHROMIUM_ID, CHROMIUM_VERSION); From 5209a62c0d321543a21cfb6ee089db82bd29c18f Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Mon, 29 Feb 2016 16:53:20 +0100 Subject: [PATCH 6/9] Set up darwin detectors in `index.js` --- lib/darwin/canary.js | 6 ------ lib/darwin/chrome.js | 6 ------ lib/darwin/chromium.js | 6 ------ lib/darwin/index.js | 19 ++++++++++++++----- lib/darwin/opera.js | 6 ------ lib/darwin/safari.js | 6 ------ lib/darwin/util.js | 2 +- 7 files changed, 15 insertions(+), 36 deletions(-) delete mode 100644 lib/darwin/canary.js delete mode 100644 lib/darwin/chrome.js delete mode 100644 lib/darwin/chromium.js delete mode 100644 lib/darwin/opera.js delete mode 100644 lib/darwin/safari.js diff --git a/lib/darwin/canary.js b/lib/darwin/canary.js deleted file mode 100644 index 2a4b1ac..0000000 --- a/lib/darwin/canary.js +++ /dev/null @@ -1,6 +0,0 @@ -var util = require( './util' ), - CHROME_CANARY_ID = 'com.google.Chrome.canary', - CHROME_CANARY_VERSION = 'KSVersion'; - -exports.path = util.find.bind(null, CHROME_CANARY_ID); -exports.version = util.getInfoKey.bind(null, CHROME_CANARY_ID, CHROME_CANARY_VERSION); diff --git a/lib/darwin/chrome.js b/lib/darwin/chrome.js deleted file mode 100644 index e7f6caa..0000000 --- a/lib/darwin/chrome.js +++ /dev/null @@ -1,6 +0,0 @@ -var util = require( './util' ), - CHROME_ID = 'com.google.Chrome', - CHROME_VERSION = 'KSVersion'; - -exports.path = util.find.bind(null, CHROME_ID); -exports.version = util.getInfoKey.bind(null, CHROME_ID, CHROME_VERSION); diff --git a/lib/darwin/chromium.js b/lib/darwin/chromium.js deleted file mode 100644 index 9cac216..0000000 --- a/lib/darwin/chromium.js +++ /dev/null @@ -1,6 +0,0 @@ -var util = require('./util'), - CHROMIUM_ID = 'org.chromium.Chromium', - CHROMIUM_VERSION = 'CFBundleShortVersionString'; - -exports.path = util.find.bind(null, CHROMIUM_ID); -exports.version = util.getInfoKey.bind(null, CHROMIUM_ID, CHROMIUM_VERSION); diff --git a/lib/darwin/index.js b/lib/darwin/index.js index c3bf668..2c6ce03 100644 --- a/lib/darwin/index.js +++ b/lib/darwin/index.js @@ -1,6 +1,15 @@ -exports.safari = require( './safari' ); +var util = require('./util'); + +function browser(id, versionKey) { + return { + path: util.find.bind(null, id), + version: util.getInfoKey(null, id, versionKey) + }; +} + +exports.safari = browser('com.apple.Safari', 'CFBundleShortVersionString'); exports.firefox = require( './firefox' ); -exports.chrome = exports[ 'google-chrome' ] = require( './chrome' ); -exports.chromium = require( './chromium' ); -exports.canary = exports[ 'chrome-canary' ] = exports[ 'google-chrome-canary' ] = require( './canary' ); -exports.opera = require( './opera' ); +exports.chrome = exports[ 'google-chrome' ] = browser('com.google.Chrome', 'KSVersion'); +exports.chromium = browser('org.chromium.Chromium', 'CFBundleShortVersionString'); +exports.canary = exports[ 'chrome-canary' ] = exports[ 'google-chrome-canary' ] = browser('com.google.Chrome.canary', 'KSVersion'); +exports.opera = browser('com.operasoftware.Opera', 'CFBundleVersion'); diff --git a/lib/darwin/opera.js b/lib/darwin/opera.js deleted file mode 100644 index f6012c3..0000000 --- a/lib/darwin/opera.js +++ /dev/null @@ -1,6 +0,0 @@ -var util = require( './util' ), - OPERA_ID = 'com.operasoftware.Opera', - OPERA_VERSION = 'CFBundleVersion'; - -exports.path = util.find.bind(null, OPERA_ID); -exports.version = util.getInfoKey.bind(null, OPERA_ID, OPERA_VERSION); diff --git a/lib/darwin/safari.js b/lib/darwin/safari.js deleted file mode 100644 index dc0db2a..0000000 --- a/lib/darwin/safari.js +++ /dev/null @@ -1,6 +0,0 @@ -var util = require( './util' ), - SAFARI_ID = 'com.apple.Safari', - SAFARI_VERSION_ID = 'CFBundleShortVersionString'; - -exports.path = util.find.bind(null, SAFARI_ID); -exports.version = util.getInfoKey.bind(null, SAFARI_ID, SAFARI_VERSION_ID); diff --git a/lib/darwin/util.js b/lib/darwin/util.js index 83c43e0..3a81c1b 100644 --- a/lib/darwin/util.js +++ b/lib/darwin/util.js @@ -72,4 +72,4 @@ function getInfoKey(bundleId, key, callback) { callback(null, data[key]); }); }); -} +} \ No newline at end of file From c59c7ea7fc43630b6a9cd69ec5f599ca0426ff7a Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Mon, 29 Feb 2016 16:55:19 +0100 Subject: [PATCH 7/9] Forgot to bind() version function --- lib/darwin/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/darwin/index.js b/lib/darwin/index.js index 2c6ce03..c89bd3d 100644 --- a/lib/darwin/index.js +++ b/lib/darwin/index.js @@ -3,7 +3,7 @@ var util = require('./util'); function browser(id, versionKey) { return { path: util.find.bind(null, id), - version: util.getInfoKey(null, id, versionKey) + version: util.getInfoKey.bind(null, id, versionKey) }; } From 79fb2f5b63f444baf729f0de7a78dd88c981ec9a Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Mon, 29 Feb 2016 17:03:18 +0100 Subject: [PATCH 8/9] Firefox can use `util` --- lib/darwin/firefox.js | 35 ---------------------------- lib/darwin/index.js | 2 +- lib/detect.js | 53 ++++++++++++++----------------------------- 3 files changed, 18 insertions(+), 72 deletions(-) delete mode 100644 lib/darwin/firefox.js diff --git a/lib/darwin/firefox.js b/lib/darwin/firefox.js deleted file mode 100644 index 50f9f1e..0000000 --- a/lib/darwin/firefox.js +++ /dev/null @@ -1,35 +0,0 @@ -var path = require('path'), - util = require('./util'); - -//Fetch all known version of Firefox on the host machine -exports.all = function (callback) { - var installed = [], - pending = 0, - check = function () { - if (!pending) { - callback(null, installed); - } - }; - - util.find('org.mozilla.firefox', function (err, p) { - if (p) { - var items = p.split('\n'); - pending = items.length; - items.forEach(function (loc) { - util.parse(util.getInfoPath(loc), function (err, data) { - if (!err) { - installed.push({ - version: data['CFBundleShortVersionString'], - path: path.join(loc, 'Contents/MacOS/firefox-bin') - }); - } - - pending--; - check(); - }); - }); - } else { - callback('not installed'); - } - }); -}; diff --git a/lib/darwin/index.js b/lib/darwin/index.js index c89bd3d..3c024c2 100644 --- a/lib/darwin/index.js +++ b/lib/darwin/index.js @@ -8,7 +8,7 @@ function browser(id, versionKey) { } exports.safari = browser('com.apple.Safari', 'CFBundleShortVersionString'); -exports.firefox = require( './firefox' ); +exports.firefox = browser('org.mozilla.firefox', 'CFBundleShortVersionString'); exports.chrome = exports[ 'google-chrome' ] = browser('com.google.Chrome', 'KSVersion'); exports.chromium = browser('org.chromium.Chromium', 'CFBundleShortVersionString'); exports.canary = exports[ 'chrome-canary' ] = exports[ 'google-chrome-canary' ] = browser('com.google.Chrome.canary', 'KSVersion'); diff --git a/lib/detect.js b/lib/detect.js index 6fdf258..23c168c 100644 --- a/lib/detect.js +++ b/lib/detect.js @@ -92,29 +92,19 @@ function detectWindows( callback ) { */ function checkDarwin( name, callback ) { if ( darwin[ name ] ) { - if ( darwin[ name ].all ) { - darwin[ name ].all( function( err, available ) { - if ( err ) { - callback( 'failed to get version for ' + name ); - } else { - callback( err, available ); - } - } ); - } else { - darwin[ name ].version( function( err, version ) { - if ( version ) { - darwin[ name ].path( function( err, p ) { - if ( err ) { - return callback( 'failed to get path for ' + name ); - } - - callback( null, version, p ); - } ); - } else { - callback( 'failed to get version for ' + name ); - } - } ); - } + darwin[ name ].version( function( err, version ) { + if ( version ) { + darwin[ name ].path( function( err, p ) { + if ( err ) { + return callback( 'failed to get path for ' + name ); + } + + callback( null, version, p ); + } ); + } else { + callback( 'failed to get version for ' + name ); + } + } ); } else { checkOthers( name, callback ); } @@ -190,19 +180,10 @@ module.exports = function detect( callback ) { check( name, function( err, v, p ) { if ( err === null ) { - if ( Array.isArray( v ) ) { - v.forEach( function( item ) { - available.push( extend( {}, br, { - command: item.path, - version: item.version - } ) ); - } ); - } else { - available.push( extend( {}, br, { - command: p || name, - version: v - } ) ); - } + available.push( extend( {}, br, { + command: p || name, + version: v + } ) ); } next(); From 4762b67f3ade6654e445c333e831fdb1071a2172 Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Mon, 29 Feb 2016 18:21:44 +0100 Subject: [PATCH 9/9] Add firefox-developer to darwin support list, fixes #8 --- lib/darwin/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/darwin/index.js b/lib/darwin/index.js index 3c024c2..2b9252d 100644 --- a/lib/darwin/index.js +++ b/lib/darwin/index.js @@ -7,9 +7,10 @@ function browser(id, versionKey) { }; } -exports.safari = browser('com.apple.Safari', 'CFBundleShortVersionString'); -exports.firefox = browser('org.mozilla.firefox', 'CFBundleShortVersionString'); exports.chrome = exports[ 'google-chrome' ] = browser('com.google.Chrome', 'KSVersion'); -exports.chromium = browser('org.chromium.Chromium', 'CFBundleShortVersionString'); exports.canary = exports[ 'chrome-canary' ] = exports[ 'google-chrome-canary' ] = browser('com.google.Chrome.canary', 'KSVersion'); +exports.chromium = browser('org.chromium.Chromium', 'CFBundleShortVersionString'); +exports.firefox = browser('org.mozilla.firefox', 'CFBundleShortVersionString'); +exports['firefox-developer'] = browser('org.mozilla.firefoxdeveloperedition', 'CFBundleShortVersionString'); +exports.safari = browser('com.apple.Safari', 'CFBundleShortVersionString'); exports.opera = browser('com.operasoftware.Opera', 'CFBundleVersion');