diff options
Diffstat (limited to 'webkit/tools/test_shell/mac/main.mm')
-rw-r--r-- | webkit/tools/test_shell/mac/main.mm | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/webkit/tools/test_shell/mac/main.mm b/webkit/tools/test_shell/mac/main.mm index 19c3507..535ac24 100644 --- a/webkit/tools/test_shell/mac/main.mm +++ b/webkit/tools/test_shell/mac/main.mm @@ -115,8 +115,8 @@ int main(const int argc, const char *argv[]) { // the windows version, so that we can run the same test scripts. stop // if we hit something that's not a switch (like, oh, a URL). - CommandLine::SetArgcArgv(argc, argv); - CommandLine parsed_command_line(argc, argv); + CommandLine::Init(argc, argv); + const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); if (parsed_command_line.HasSwitch(test_shell::kCheckLayoutTestSystemDeps)) { // Always succeed the deps check, currently just used by windows port. @@ -167,7 +167,7 @@ int main(const int argc, const char *argv[]) { std::wstring javascript_flags = parsed_command_line.GetSwitchValue(test_shell::kJavaScriptFlags); // Test shell always exposes the GC. - CommandLine::AppendSwitch(&javascript_flags, L"expose-gc"); + javascript_flags += L" --expose-gc"; webkit_glue::SetJavaScriptFlags(javascript_flags); // Load and initialize the stats table (one per process, so that multiple @@ -235,12 +235,10 @@ int main(const int argc, const char *argv[]) { uri = UTF8ToWide([testShellURL UTF8String]); } - if (parsed_command_line.GetLooseValueCount() > 0) { - CommandLine::LooseValueIterator iter = - parsed_command_line.GetLooseValuesBegin(); - uri = *iter; - } - + std::vector<std::wstring> values = parsed_command_line.GetLooseValues(); + if (values.size() > 0) + uri = values[0]; + TestShell* shell; if (TestShell::CreateNewWindow(uri, &shell)) { #ifdef NOTYET |