summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-25 16:49:45 +0000
committerojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-25 16:49:45 +0000
commita052d79b2d27d4484ac3fc126061ffb4ae514313 (patch)
tree3740823402dc30de35ebf9ba50aba8b6a6340436 /webkit
parent97f4fedbc16a3d1729acb8cfe1a7c892f840efa8 (diff)
downloadchromium_src-a052d79b2d27d4484ac3fc126061ffb4ae514313.zip
chromium_src-a052d79b2d27d4484ac3fc126061ffb4ae514313.tar.gz
chromium_src-a052d79b2d27d4484ac3fc126061ffb4ae514313.tar.bz2
Make sure threading is initialized when running test_shell_tests
so the order they're run in doesn't matter. Review URL: http://codereview.chromium.org/12627 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5975 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webkit_glue.cc4
-rw-r--r--webkit/glue/webkit_glue.h2
-rw-r--r--webkit/tools/test_shell/run_all_tests.cc3
3 files changed, 9 insertions, 0 deletions
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc
index 9b24362..a5bc0fe 100644
--- a/webkit/glue/webkit_glue.cc
+++ b/webkit/glue/webkit_glue.cc
@@ -81,6 +81,10 @@ bool IsLayoutTestMode() {
return layout_test_mode_;
}
+void InitializeForTesting() {
+ WTF::initializeThreading();
+}
+
void EnableWebCoreNotImplementedLogging() {
WebCore::LogNotYetImplemented.state = WTFLogChannelOn;
}
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h
index a22df67..1c70917 100644
--- a/webkit/glue/webkit_glue.h
+++ b/webkit/glue/webkit_glue.h
@@ -67,6 +67,8 @@ void SetShouldExposeGCController(bool enable);
void SetLayoutTestMode(bool enable);
bool IsLayoutTestMode();
+void InitializeForTesting();
+
// Turn on the logging for notImplemented() calls from WebCore.
void EnableWebCoreNotImplementedLogging();
diff --git a/webkit/tools/test_shell/run_all_tests.cc b/webkit/tools/test_shell/run_all_tests.cc
index f85dc30..153ba85 100644
--- a/webkit/tools/test_shell/run_all_tests.cc
+++ b/webkit/tools/test_shell/run_all_tests.cc
@@ -19,6 +19,7 @@
#include "base/icu_util.h"
#include "base/message_loop.h"
#include "base/process_util.h"
+#include "webkit/glue/webkit_glue.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
#include "webkit/tools/test_shell/test_shell.h"
#include "webkit/tools/test_shell/test_shell_test.h"
@@ -62,6 +63,8 @@ int main(int argc, char* argv[]) {
// request than automatically quit.
TestShell::InitializeTestShell(false);
+ webkit_glue::InitializeForTesting();
+
// Allocate a message loop for this thread. Although it is not used
// directly, its constructor sets up some necessary state.
MessageLoop main_message_loop;