default_app: Don't quit when started as web driver.
This commit is contained in:
parent
f952dae0d0
commit
4a4814b41c
1 changed files with 4 additions and 2 deletions
|
@ -11,11 +11,13 @@ app.on('window-all-closed', function() {
|
||||||
|
|
||||||
// Parse command line options.
|
// Parse command line options.
|
||||||
var argv = process.argv.slice(1);
|
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) {
|
for (var i in argv) {
|
||||||
if (argv[i] == '--version' || argv[i] == '-v') {
|
if (argv[i] == '--version' || argv[i] == '-v') {
|
||||||
option.version = true;
|
option.version = true;
|
||||||
break;
|
break;
|
||||||
|
} else if (argv[i] == '--test-type=webdriver') {
|
||||||
|
option.webdriver = true;
|
||||||
} else if (argv[i][0] == '-') {
|
} else if (argv[i][0] == '-') {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} 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 specified app if there is one specified in command line, otherwise
|
||||||
// start the default app.
|
// start the default app.
|
||||||
if (option.file) {
|
if (option.file && !option.webdriver) {
|
||||||
try {
|
try {
|
||||||
// Override app name and version.
|
// Override app name and version.
|
||||||
var packagePath = path.resolve(option.file);
|
var packagePath = path.resolve(option.file);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue