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 "webkit/support/webkit_support.h" | 5 #include "webkit/support/webkit_support.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug_util.h" | 9 #include "base/debug_util.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 } // namespace | 113 } // namespace |
114 | 114 |
115 namespace webkit_support { | 115 namespace webkit_support { |
116 | 116 |
117 static TestEnvironment* test_environment; | 117 static TestEnvironment* test_environment; |
118 | 118 |
119 static void SetUpTestEnvironmentImpl(bool unit_test_mode) { | 119 static void SetUpTestEnvironmentImpl(bool unit_test_mode) { |
| 120 base::EnableInProcessStackDumping(); |
120 base::EnableTerminationOnHeapCorruption(); | 121 base::EnableTerminationOnHeapCorruption(); |
121 | 122 |
122 // Initialize the singleton CommandLine with fixed values. Some code refer to | 123 // Initialize the singleton CommandLine with fixed values. Some code refer to |
123 // CommandLine::ForCurrentProcess(). We don't use the actual command-line | 124 // CommandLine::ForCurrentProcess(). We don't use the actual command-line |
124 // arguments of DRT to avoid unexpected behavior change. | 125 // arguments of DRT to avoid unexpected behavior change. |
125 // | 126 // |
126 // webkit/glue/webmediaplayer_impl.cc checks --enable-openmax. | 127 // webkit/glue/webmediaplayer_impl.cc checks --enable-openmax. |
127 // webkit/glue/plugin/plugin_list_posix.cc checks --debug-plugin-loading. | 128 // webkit/glue/plugin/plugin_list_posix.cc checks --debug-plugin-loading. |
128 // webkit/glue/plugin/plugin_list_win.cc checks --old-wmp. | 129 // webkit/glue/plugin/plugin_list_win.cc checks --old-wmp. |
129 // If DRT needs these flags, specify them in the following kFixedArguments. | 130 // If DRT needs these flags, specify them in the following kFixedArguments. |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS); | 392 IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS); |
392 return WebCString(debuggerScriptJS.as_string().c_str()); | 393 return WebCString(debuggerScriptJS.as_string().c_str()); |
393 } | 394 } |
394 | 395 |
395 WebURL GetDevToolsPathAsURL() { | 396 WebURL GetDevToolsPathAsURL() { |
396 FilePath dirExe; | 397 FilePath dirExe; |
397 if (!webkit_glue::GetExeDirectory(&dirExe)) { | 398 if (!webkit_glue::GetExeDirectory(&dirExe)) { |
398 DCHECK(false); | 399 DCHECK(false); |
399 return WebURL(); | 400 return WebURL(); |
400 } | 401 } |
401 FilePath devToolsPath = dirExe.AppendASCII("resources/inspector/devtools.html"
); | 402 FilePath devToolsPath = dirExe.AppendASCII( |
| 403 "resources/inspector/devtools.html"); |
402 return net::FilePathToFileURL(devToolsPath); | 404 return net::FilePathToFileURL(devToolsPath); |
403 } | 405 } |
404 | 406 |
405 } // namespace webkit_support | 407 } // namespace webkit_support |
OLD | NEW |