]> khamidou — GitHub mirrors - electron.git/commitdiff
default_app: Don't quit when started as web driver.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 12 Sep 2014 14:54:00 +0000 (22:54 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 12 Sep 2014 14:54:00 +0000 (22:54 +0800)
atom/browser/default_app/main.js

index 922dd799e3800176deb96357a02081d1a8091ed6..ae4a844cca38ad65d86b8902b531e5c425fa296b 100644 (file)
@@ -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);