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

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

Issue 203065: Enable the ability to run layout tests on Vista as well as XP. See the note ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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
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 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/basictypes.h" 6 #include "base/basictypes.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/event_recorder.h" 8 #include "base/event_recorder.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // directly, its constructor sets up some necessary state. 72 // directly, its constructor sets up some necessary state.
73 MessageLoopForUI main_message_loop; 73 MessageLoopForUI main_message_loop;
74 74
75 bool suppress_error_dialogs = ( 75 bool suppress_error_dialogs = (
76 base::SysInfo::HasEnvVar(L"CHROME_HEADLESS") || 76 base::SysInfo::HasEnvVar(L"CHROME_HEADLESS") ||
77 parsed_command_line.HasSwitch(test_shell::kNoErrorDialogs) || 77 parsed_command_line.HasSwitch(test_shell::kNoErrorDialogs) ||
78 parsed_command_line.HasSwitch(test_shell::kLayoutTests)); 78 parsed_command_line.HasSwitch(test_shell::kLayoutTests));
79 bool layout_test_mode = 79 bool layout_test_mode =
80 parsed_command_line.HasSwitch(test_shell::kLayoutTests); 80 parsed_command_line.HasSwitch(test_shell::kLayoutTests);
81 bool ux_theme = parsed_command_line.HasSwitch(test_shell::kUxTheme); 81 bool ux_theme = parsed_command_line.HasSwitch(test_shell::kUxTheme);
82 bool generic_theme = 82 bool classic_theme =
83 parsed_command_line.HasSwitch(test_shell::kClassicTheme);
84 bool generic_theme = (layout_test_mode && !ux_theme && !classic_theme) ||
83 parsed_command_line.HasSwitch(test_shell::kGenericTheme); 85 parsed_command_line.HasSwitch(test_shell::kGenericTheme);
84 bool classic_theme = (layout_test_mode && !ux_theme && !generic_theme) ||
85 parsed_command_line.HasSwitch(test_shell::kClassicTheme);
86 86
87 bool enable_gp_fault_error_box = false; 87 bool enable_gp_fault_error_box = false;
88 enable_gp_fault_error_box = 88 enable_gp_fault_error_box =
89 parsed_command_line.HasSwitch(test_shell::kGPFaultErrorBox); 89 parsed_command_line.HasSwitch(test_shell::kGPFaultErrorBox);
90 TestShell::InitLogging(suppress_error_dialogs, 90 TestShell::InitLogging(suppress_error_dialogs,
91 layout_test_mode, 91 layout_test_mode,
92 enable_gp_fault_error_box); 92 enable_gp_fault_error_box);
93 93
94 // Initialize WebKit for this scope. 94 // Initialize WebKit for this scope.
95 TestShellWebKitInit test_shell_webkit_init(layout_test_mode); 95 TestShellWebKitInit test_shell_webkit_init(layout_test_mode);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 TestShell::ShutdownTestShell(); 351 TestShell::ShutdownTestShell();
352 TestShell::CleanupLogging(); 352 TestShell::CleanupLogging();
353 353
354 // Tear down shared StatsTable; prevents unit_tests from leaking it. 354 // Tear down shared StatsTable; prevents unit_tests from leaking it.
355 StatsTable::set_current(NULL); 355 StatsTable::set_current(NULL);
356 delete table; 356 delete table;
357 357
358 return 0; 358 return 0;
359 } 359 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698