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

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

Issue 2915: Add a new switch: --allow-scripts-to-close-windows.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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
« no previous file with comments | « webkit/tools/test_shell/test_shell.cc ('k') | webkit/tools/test_shell/test_shell_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6
7 #include <stdlib.h> // required by _set_abort_behavior 7 #include <stdlib.h> // required by _set_abort_behavior
8 8
9 #include <windows.h> 9 #include <windows.h>
10 #include <commctrl.h> 10 #include <commctrl.h>
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 188
189 INITCOMMONCONTROLSEX InitCtrlEx; 189 INITCOMMONCONTROLSEX InitCtrlEx;
190 190
191 InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX); 191 InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX);
192 InitCtrlEx.dwICC = ICC_STANDARD_CLASSES; 192 InitCtrlEx.dwICC = ICC_STANDARD_CLASSES;
193 InitCommonControlsEx(&InitCtrlEx); 193 InitCommonControlsEx(&InitCtrlEx);
194 194
195 bool interactive = !layout_test_mode; 195 bool interactive = !layout_test_mode;
196 TestShell::InitializeTestShell(interactive); 196 TestShell::InitializeTestShell(interactive);
197 197
198 if (parsed_command_line.HasSwitch(test_shell::kAllowScriptsToCloseWindows))
199 TestShell::SetAllowScriptsToCloseWindows();
200
198 // Disable user themes for layout tests so pixel tests are consistent. 201 // Disable user themes for layout tests so pixel tests are consistent.
199 if (!interactive) 202 if (!interactive)
200 gfx::NativeTheme::instance()->DisableTheming(); 203 gfx::NativeTheme::instance()->DisableTheming();
201 204
202 if (parsed_command_line.HasSwitch(test_shell::kTestShellTimeOut)) { 205 if (parsed_command_line.HasSwitch(test_shell::kTestShellTimeOut)) {
203 const std::wstring timeout_str = parsed_command_line.GetSwitchValue( 206 const std::wstring timeout_str = parsed_command_line.GetSwitchValue(
204 test_shell::kTestShellTimeOut); 207 test_shell::kTestShellTimeOut);
205 int timeout_ms = static_cast<int>(StringToInt64(timeout_str.c_str())); 208 int timeout_ms = static_cast<int>(StringToInt64(timeout_str.c_str()));
206 if (timeout_ms > 0) 209 if (timeout_ms > 0)
207 TestShell::SetFileTestTimeout(timeout_ms); 210 TestShell::SetFileTestTimeout(timeout_ms);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 StatsTable::set_current(NULL); 346 StatsTable::set_current(NULL);
344 delete table; 347 delete table;
345 348
346 #ifdef _CRTDBG_MAP_ALLOC 349 #ifdef _CRTDBG_MAP_ALLOC
347 _CrtDumpMemoryLeaks(); 350 _CrtDumpMemoryLeaks();
348 #endif 351 #endif
349 return 0; 352 return 0;
350 } 353 }
351 354
352 355
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell.cc ('k') | webkit/tools/test_shell/test_shell_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698