Skip to content

Commit 5ebe135

Browse files
author
Mykola Tryshnivskyy
committed
Added --config option support for Windows
1 parent bb432ca commit 5ebe135

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

src/chrome/test/webdriver/webdriver_server.cc

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -466,17 +466,15 @@ int RunChromeDriver() {
466466
return (EXIT_SUCCESS);
467467
}
468468

469-
#if !defined(OS_WIN)
470469
bool parse_config_to_cmd_line()
471470
{
472471
CommandLine* cmd_line = CommandLine::ForCurrentProcess();
472+
473473
if (cmd_line->HasSwitch("config"))
474474
{
475475
//parse json config file and set value
476476
std::string config_json;
477-
std::string configPathString = cmd_line->GetSwitchValueASCII("config");
478-
479-
FilePath configPath(configPathString);
477+
FilePath configPath(cmd_line->GetSwitchValueNative("config"));
480478

481479
if (file_util::ReadFileToString(configPath, &config_json))
482480
{
@@ -511,26 +509,22 @@ bool parse_config_to_cmd_line()
511509
cmd_line->AppendSwitchASCII("http-threads", base::IntToString(http_threads));
512510
if (result_dict->GetString("log-path", &log_path))
513511
cmd_line->AppendSwitchASCII("log-path", log_path);
514-
515-
return true;
516-
517512
}
518513
else
519514
{
520515
std::cerr << "can't read file" << std::endl;
521516
return false;
522517
}
523518
}
519+
520+
return true;
524521
}
525-
#endif //!defined(OS_WIN)
526522
} // namespace webdriver
527523

528524
int main_server(int argc, char *argv[]) {
529525
CommandLine::Init(argc, argv);
530526

531-
#if !defined(OS_WIN)
532527
webdriver::parse_config_to_cmd_line();
533-
#endif
534528

535529
return webdriver::RunChromeDriver();
536530
}

src/third_party/mongoose/mongoose.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
#endif
5959
#define _WIN32_WINNT 0x0400 // To make it link in VS2005
6060
#include <windows.h>
61-
#include <winsock2.h>
61+
//#include <winsock2.h>
6262

6363
#ifndef PATH_MAX
6464
#define PATH_MAX MAX_PATH

0 commit comments

Comments
 (0)