summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 18:03:47 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 18:03:47 +0000
commitd6fc9fd286eb7a3a6cad937da3b99cf8f4acd5c2 (patch)
treeff8de9ff438626c6d26a9df0acb94fadfd640431 /webkit
parent30be1ce62471386dbdebf8d8f4f87e31a772661c (diff)
downloadchromium_src-d6fc9fd286eb7a3a6cad937da3b99cf8f4acd5c2.zip
chromium_src-d6fc9fd286eb7a3a6cad937da3b99cf8f4acd5c2.tar.gz
chromium_src-d6fc9fd286eb7a3a6cad937da3b99cf8f4acd5c2.tar.bz2
Move console stack dumping code to a function so it can be reused in test_shell_tests.
TEST=none BUG=13770 Review URL: http://codereview.chromium.org/339024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/test_shell/run_all_tests.cc3
-rw-r--r--webkit/tools/test_shell/test_shell.gyp5
-rw-r--r--webkit/tools/test_shell/test_shell_main.cc7
-rw-r--r--webkit/tools/test_shell/test_shell_test.h2
4 files changed, 12 insertions, 5 deletions
diff --git a/webkit/tools/test_shell/run_all_tests.cc b/webkit/tools/test_shell/run_all_tests.cc
index 3c6ec3f..560604b 100644
--- a/webkit/tools/test_shell/run_all_tests.cc
+++ b/webkit/tools/test_shell/run_all_tests.cc
@@ -31,7 +31,7 @@
#include "webkit/tools/test_shell/test_shell_webkit_init.h"
#include "testing/gtest/include/gtest/gtest.h"
-const char* TestShellTest::kJavascriptDelayExitScript =
+const char* const TestShellTest::kJavascriptDelayExitScript =
"<script>"
"window.layoutTestController.waitUntilDone();"
"window.addEventListener('load', function() {"
@@ -42,6 +42,7 @@ const char* TestShellTest::kJavascriptDelayExitScript =
int main(int argc, char* argv[]) {
base::ScopedNSAutoreleasePool autorelease_pool;
+ base::EnableInProcessStackDumping();
base::EnableTerminationOnHeapCorruption();
// Some unittests may use base::Singleton<>, thus we need to instanciate
// the AtExitManager or else we will leak objects.
diff --git a/webkit/tools/test_shell/test_shell.gyp b/webkit/tools/test_shell/test_shell.gyp
index 6870e10..f0fe364 100644
--- a/webkit/tools/test_shell/test_shell.gyp
+++ b/webkit/tools/test_shell/test_shell.gyp
@@ -244,6 +244,11 @@
'test_shell_common',
'../../../tools/imagediff/image_diff.gyp:image_diff',
],
+ 'defines': [
+ # Technically not a unit test but require functions available only to
+ # unit tests.
+ 'UNIT_TEST'
+ ],
'sources': [
'test_shell_main.cc',
],
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc
index 9f2ae67..b069b2f 100644
--- a/webkit/tools/test_shell/test_shell_main.cc
+++ b/webkit/tools/test_shell/test_shell_main.cc
@@ -45,13 +45,14 @@ using WebKit::WebScriptController;
namespace {
// StatsTable initialization parameters.
-static const char* kStatsFilePrefix = "testshell_";
-static int kStatsFileThreads = 20;
-static int kStatsFileCounters = 200;
+const char* const kStatsFilePrefix = "testshell_";
+int kStatsFileThreads = 20;
+int kStatsFileCounters = 200;
} // namespace
int main(int argc, char* argv[]) {
+ base::EnableInProcessStackDumping();
base::EnableTerminationOnHeapCorruption();
// Some tests may use base::Singleton<>, thus we need to instanciate
diff --git a/webkit/tools/test_shell/test_shell_test.h b/webkit/tools/test_shell/test_shell_test.h
index a5e0705..48dc8f93 100644
--- a/webkit/tools/test_shell/test_shell_test.h
+++ b/webkit/tools/test_shell/test_shell_test.h
@@ -29,7 +29,7 @@ class TestShellTest : public testing::Test {
// Don't refactor away; some unittests override this!
virtual void CreateEmptyWindow();
- static const char* kJavascriptDelayExitScript;
+ static const char* const kJavascriptDelayExitScript;
protected:
// Location of SOURCE_ROOT/webkit/data/