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

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

Issue 339024: Move console stack dumping code to a function so it can be reused in test_she... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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.gyp ('k') | webkit/tools/test_shell/test_shell_test.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 #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 27 matching lines...) Expand all
38 #include "webkit/tools/test_shell/test_shell_switches.h" 38 #include "webkit/tools/test_shell/test_shell_switches.h"
39 #include "webkit/tools/test_shell/test_shell_webkit_init.h" 39 #include "webkit/tools/test_shell/test_shell_webkit_init.h"
40 40
41 static const size_t kPathBufSize = 2048; 41 static const size_t kPathBufSize = 2048;
42 42
43 using WebKit::WebScriptController; 43 using WebKit::WebScriptController;
44 44
45 namespace { 45 namespace {
46 46
47 // StatsTable initialization parameters. 47 // StatsTable initialization parameters.
48 static const char* kStatsFilePrefix = "testshell_"; 48 const char* const kStatsFilePrefix = "testshell_";
49 static int kStatsFileThreads = 20; 49 int kStatsFileThreads = 20;
50 static int kStatsFileCounters = 200; 50 int kStatsFileCounters = 200;
51 51
52 } // namespace 52 } // namespace
53 53
54 int main(int argc, char* argv[]) { 54 int main(int argc, char* argv[]) {
55 base::EnableInProcessStackDumping();
55 base::EnableTerminationOnHeapCorruption(); 56 base::EnableTerminationOnHeapCorruption();
56 57
57 // Some tests may use base::Singleton<>, thus we need to instanciate 58 // Some tests may use base::Singleton<>, thus we need to instanciate
58 // the AtExitManager or else we will leak objects. 59 // the AtExitManager or else we will leak objects.
59 base::AtExitManager at_exit_manager; 60 base::AtExitManager at_exit_manager;
60 61
61 TestShellPlatformDelegate::PreflightArgs(&argc, &argv); 62 TestShellPlatformDelegate::PreflightArgs(&argc, &argv);
62 CommandLine::Init(argc, argv); 63 CommandLine::Init(argc, argv);
63 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 64 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
64 65
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 360
360 TestShell::ShutdownTestShell(); 361 TestShell::ShutdownTestShell();
361 TestShell::CleanupLogging(); 362 TestShell::CleanupLogging();
362 363
363 // Tear down shared StatsTable; prevents unit_tests from leaking it. 364 // Tear down shared StatsTable; prevents unit_tests from leaking it.
364 StatsTable::set_current(NULL); 365 StatsTable::set_current(NULL);
365 delete table; 366 delete table;
366 367
367 return 0; 368 return 0;
368 } 369 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell.gyp ('k') | webkit/tools/test_shell/test_shell_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698