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

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

Issue 6862002: Merge gpu_trace_event back into base/debug/trace_event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to 84062 Created 9 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/event_recorder.h" 10 #include "base/event_recorder.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // Initialize WebKit for this scope. 151 // Initialize WebKit for this scope.
152 TestShellWebKitInit test_shell_webkit_init(layout_test_mode); 152 TestShellWebKitInit test_shell_webkit_init(layout_test_mode);
153 153
154 // Suppress abort message in v8 library in debugging mode (but not 154 // Suppress abort message in v8 library in debugging mode (but not
155 // actually under a debugger). V8 calls abort() when it hits 155 // actually under a debugger). V8 calls abort() when it hits
156 // assertion errors. 156 // assertion errors.
157 if (suppress_error_dialogs) { 157 if (suppress_error_dialogs) {
158 platform.SuppressErrorReporting(); 158 platform.SuppressErrorReporting();
159 } 159 }
160 160
161 if (parsed_command_line.HasSwitch(test_shell::kEnableTracing))
162 base::debug::TraceLog::StartTracing();
163
164 net::HttpCache::Mode cache_mode = net::HttpCache::NORMAL; 161 net::HttpCache::Mode cache_mode = net::HttpCache::NORMAL;
165 162
166 // This is a special mode where JS helps the browser implement 163 // This is a special mode where JS helps the browser implement
167 // playback/record mode. Generally, in this mode, some functions 164 // playback/record mode. Generally, in this mode, some functions
168 // of client-side randomness are removed. For example, in 165 // of client-side randomness are removed. For example, in
169 // this mode Math.random() and Date.getTime() may not return 166 // this mode Math.random() and Date.getTime() may not return
170 // values which vary. 167 // values which vary.
171 bool playback_mode = 168 bool playback_mode =
172 parsed_command_line.HasSwitch(test_shell::kPlaybackMode); 169 parsed_command_line.HasSwitch(test_shell::kPlaybackMode);
173 bool record_mode = 170 bool record_mode =
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 TestShell::ShutdownTestShell(); 343 TestShell::ShutdownTestShell();
347 TestShell::CleanupLogging(); 344 TestShell::CleanupLogging();
348 345
349 // Tear down shared StatsTable; prevents unit_tests from leaking it. 346 // Tear down shared StatsTable; prevents unit_tests from leaking it.
350 base::StatsTable::set_current(NULL); 347 base::StatsTable::set_current(NULL);
351 delete table; 348 delete table;
352 RemoveSharedMemoryFile(stats_filename); 349 RemoveSharedMemoryFile(stats_filename);
353 350
354 return 0; 351 return 0;
355 } 352 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698