OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/app_switches.h" | 5 #include "app/app_switches.h" |
6 #include "app/gfx/gl/gl_implementation.h" | 6 #include "app/gfx/gl/gl_implementation.h" |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" |
10 #include "base/environment.h" | 11 #include "base/environment.h" |
11 #include "base/event_recorder.h" | 12 #include "base/event_recorder.h" |
12 #include "base/file_path.h" | 13 #include "base/file_path.h" |
13 #include "base/file_util.h" | 14 #include "base/file_util.h" |
14 #include "base/i18n/icu_util.h" | 15 #include "base/i18n/icu_util.h" |
15 #include "base/memory_debug.h" | 16 #include "base/memory_debug.h" |
16 #include "base/message_loop.h" | 17 #include "base/message_loop.h" |
17 #include "base/metrics/stats_table.h" | 18 #include "base/metrics/stats_table.h" |
18 #include "base/path_service.h" | 19 #include "base/path_service.h" |
19 #include "base/process_util.h" | 20 #include "base/process_util.h" |
20 #include "base/rand_util.h" | 21 #include "base/rand_util.h" |
21 #include "base/string_number_conversions.h" | 22 #include "base/string_number_conversions.h" |
22 #include "base/sys_info.h" | 23 #include "base/sys_info.h" |
23 #include "base/trace_event.h" | |
24 #include "base/utf_string_conversions.h" | 24 #include "base/utf_string_conversions.h" |
25 #include "net/base/cookie_monster.h" | 25 #include "net/base/cookie_monster.h" |
26 #include "net/base/net_module.h" | 26 #include "net/base/net_module.h" |
27 #include "net/base/net_util.h" | 27 #include "net/base/net_util.h" |
28 #include "net/http/http_cache.h" | 28 #include "net/http/http_cache.h" |
29 #include "net/test/test_server.h" | 29 #include "net/test/test_server.h" |
30 #include "net/url_request/url_request_context.h" | 30 #include "net/url_request/url_request_context.h" |
31 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" | 31 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" |
32 #include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h" | 32 #include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h" |
33 #include "webkit/glue/webkit_glue.h" | 33 #include "webkit/glue/webkit_glue.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 TestShellWebKitInit test_shell_webkit_init(layout_test_mode); | 139 TestShellWebKitInit test_shell_webkit_init(layout_test_mode); |
140 | 140 |
141 // Suppress abort message in v8 library in debugging mode (but not | 141 // Suppress abort message in v8 library in debugging mode (but not |
142 // actually under a debugger). V8 calls abort() when it hits | 142 // actually under a debugger). V8 calls abort() when it hits |
143 // assertion errors. | 143 // assertion errors. |
144 if (suppress_error_dialogs) { | 144 if (suppress_error_dialogs) { |
145 platform.SuppressErrorReporting(); | 145 platform.SuppressErrorReporting(); |
146 } | 146 } |
147 | 147 |
148 if (parsed_command_line.HasSwitch(test_shell::kEnableTracing)) | 148 if (parsed_command_line.HasSwitch(test_shell::kEnableTracing)) |
149 base::TraceLog::StartTracing(); | 149 base::debug::TraceLog::StartTracing(); |
150 | 150 |
151 net::HttpCache::Mode cache_mode = net::HttpCache::NORMAL; | 151 net::HttpCache::Mode cache_mode = net::HttpCache::NORMAL; |
152 | 152 |
153 // This is a special mode where JS helps the browser implement | 153 // This is a special mode where JS helps the browser implement |
154 // playback/record mode. Generally, in this mode, some functions | 154 // playback/record mode. Generally, in this mode, some functions |
155 // of client-side randomness are removed. For example, in | 155 // of client-side randomness are removed. For example, in |
156 // this mode Math.random() and Date.getTime() may not return | 156 // this mode Math.random() and Date.getTime() may not return |
157 // values which vary. | 157 // values which vary. |
158 bool playback_mode = | 158 bool playback_mode = |
159 parsed_command_line.HasSwitch(test_shell::kPlaybackMode); | 159 parsed_command_line.HasSwitch(test_shell::kPlaybackMode); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 TestShell::ShutdownTestShell(); | 397 TestShell::ShutdownTestShell(); |
398 TestShell::CleanupLogging(); | 398 TestShell::CleanupLogging(); |
399 | 399 |
400 // Tear down shared StatsTable; prevents unit_tests from leaking it. | 400 // Tear down shared StatsTable; prevents unit_tests from leaking it. |
401 base::StatsTable::set_current(NULL); | 401 base::StatsTable::set_current(NULL); |
402 delete table; | 402 delete table; |
403 RemoveSharedMemoryFile(stats_filename); | 403 RemoveSharedMemoryFile(stats_filename); |
404 | 404 |
405 return 0; | 405 return 0; |
406 } | 406 } |
OLD | NEW |