From 4a4814b41c9b3e4b4e1973f5fa3ef75d5b49c480 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 12 Sep 2014 22:54:00 +0800 Subject: [PATCH] default_app: Don't quit when started as web driver. --- atom/browser/default_app/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/atom/browser/default_app/main.js b/atom/browser/default_app/main.js index 922dd799e380..ae4a844cca38 100644 --- a/atom/browser/default_app/main.js +++ b/atom/browser/default_app/main.js @@ -11,11 +11,13 @@ app.on('window-all-closed', function() { // Parse command line options. var argv = process.argv.slice(1); -var option = { file: null, version: null }; +var option = { file: null, version: null, webdriver: null }; for (var i in argv) { if (argv[i] == '--version' || argv[i] == '-v') { option.version = true; break; + } else if (argv[i] == '--test-type=webdriver') { + option.webdriver = true; } else if (argv[i][0] == '-') { continue; } else { @@ -26,7 +28,7 @@ for (var i in argv) { // Start the specified app if there is one specified in command line, otherwise // start the default app. -if (option.file) { +if (option.file && !option.webdriver) { try { // Override app name and version. var packagePath = path.resolve(option.file);