diff options
author | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-09 13:10:58 +0000 |
---|---|---|
committer | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-09 13:10:58 +0000 |
commit | 84cf76334d4175b3673d88bdbe431ee604face96 (patch) | |
tree | 77d651c8e271023c2612ca7fac819288cea39e20 /webkit/tools/test_shell/mac | |
parent | 02b5d70b745ae19dd1990086034def0ba64846e5 (diff) | |
download | chromium_src-84cf76334d4175b3673d88bdbe431ee604face96.zip chromium_src-84cf76334d4175b3673d88bdbe431ee604face96.tar.gz chromium_src-84cf76334d4175b3673d88bdbe431ee604face96.tar.bz2 |
Changes to get the layout test harness running on mac.
Review URL: http://codereview.chromium.org/5614
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3095 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/mac')
-rw-r--r-- | webkit/tools/test_shell/mac/main.mm | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/webkit/tools/test_shell/mac/main.mm b/webkit/tools/test_shell/mac/main.mm index 552da77..2758373f 100644 --- a/webkit/tools/test_shell/mac/main.mm +++ b/webkit/tools/test_shell/mac/main.mm @@ -110,16 +110,19 @@ 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"); + webkit_glue::SetJavaScriptFlags(javascript_flags); +#if NOT_YET //TODO: record/playback modes - /* bool playback_mode = parsed_command_line.HasSwitch(test_shell::kPlaybackMode); bool record_mode = parsed_command_line.HasSwitch(test_shell::kRecordMode); bool no_events = parsed_command_line.HasSwitch(test_shell::kNoEvents); - */ +#endif bool dump_stats_table = parsed_command_line.HasSwitch(test_shell::kDumpStatsTable); @@ -148,13 +151,11 @@ int main(const int argc, const char *argv[]) { // Config the network module so it has access to a limited set of resources. // NetModule::SetResourceProvider(NetResourceProvider); - // if we have loose arguments, interpret the next one as a URL + // Treat the first loose value as the initial URL to open. std::wstring uri; - if (parsed_command_line.GetLooseValueCount() > 0) { - CommandLine::LooseValueIterator iter = - parsed_command_line.GetLooseValuesBegin(); - uri = *iter; - } else { + + // Default to a homepage if we're interactive + if (interactive) { NSString *resourcePath = [[NSBundle mainBundle] resourcePath]; NSString *testShellPath = [resourcePath stringByAppendingPathComponent:@"test_shell/index.html"]; @@ -165,6 +166,12 @@ 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; + } + TestShell* shell; if (TestShell::CreateNewWindow(uri, &shell)) { #ifdef NOTYET @@ -221,7 +228,6 @@ int main(const int argc, const char *argv[]) { } if (no_tree) params.dump_tree = false; - if (uri.length() == 0) { // Watch stdin for URLs. char filenameBuffer[2048]; |