Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: webkit/tools/test_shell/test_shell_main.cc

Issue 28281: Get rid of wstring variants of StringToFoo. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Creates an instance of the test_shell. 5 // Creates an instance of the test_shell.
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 TestShell::SetAllowScriptsToCloseWindows(); 144 TestShell::SetAllowScriptsToCloseWindows();
145 145
146 // Disable user themes for layout tests so pixel tests are consistent. 146 // Disable user themes for layout tests so pixel tests are consistent.
147 if (layout_test_mode) { 147 if (layout_test_mode) {
148 platform.SelectUnifiedTheme(); 148 platform.SelectUnifiedTheme();
149 } 149 }
150 150
151 if (parsed_command_line.HasSwitch(test_shell::kTestShellTimeOut)) { 151 if (parsed_command_line.HasSwitch(test_shell::kTestShellTimeOut)) {
152 const std::wstring timeout_str = parsed_command_line.GetSwitchValue( 152 const std::wstring timeout_str = parsed_command_line.GetSwitchValue(
153 test_shell::kTestShellTimeOut); 153 test_shell::kTestShellTimeOut);
154 int timeout_ms = static_cast<int>(StringToInt64(timeout_str.c_str())); 154 int timeout_ms =
155 static_cast<int>(StringToInt64(WideToUTF16Hack(timeout_str.c_str())));
155 if (timeout_ms > 0) 156 if (timeout_ms > 0)
156 TestShell::SetFileTestTimeout(timeout_ms); 157 TestShell::SetFileTestTimeout(timeout_ms);
157 } 158 }
158 159
159 // Treat the first loose value as the initial URL to open. 160 // Treat the first loose value as the initial URL to open.
160 std::wstring uri; 161 std::wstring uri;
161 162
162 // Default to a homepage if we're interactive. 163 // Default to a homepage if we're interactive.
163 if (!layout_test_mode) { 164 if (!layout_test_mode) {
164 PathService::Get(base::DIR_SOURCE_ROOT, &uri); 165 PathService::Get(base::DIR_SOURCE_ROOT, &uri);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 290
290 TestShell::ShutdownTestShell(); 291 TestShell::ShutdownTestShell();
291 TestShell::CleanupLogging(); 292 TestShell::CleanupLogging();
292 293
293 // Tear down shared StatsTable; prevents unit_tests from leaking it. 294 // Tear down shared StatsTable; prevents unit_tests from leaking it.
294 StatsTable::set_current(NULL); 295 StatsTable::set_current(NULL);
295 delete table; 296 delete table;
296 297
297 return 0; 298 return 0;
298 } 299 }
OLDNEW
« chrome/common/pref_service.cc ('K') | « webkit/tools/test_shell/node_leak_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698