summaryrefslogtreecommitdiffstats
path: root/base/test_suite.h
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-19 18:36:23 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-19 18:36:23 +0000
commitb16ef312cb28582a1d324d20e4328afeef2c7538 (patch)
treebcbc40bbe3950501c888eab655f5070619ad1ac7 /base/test_suite.h
parent4880adb3346faa91feea9d8ecfecc4ef499bf7fc (diff)
downloadchromium_src-b16ef312cb28582a1d324d20e4328afeef2c7538.zip
chromium_src-b16ef312cb28582a1d324d20e4328afeef2c7538.tar.gz
chromium_src-b16ef312cb28582a1d324d20e4328afeef2c7538.tar.bz2
Define MessagePumpDefault and use it to implement MessageLoop on non-Windows
platforms. This is actually just a first-step toward the real fix which is to use MessagePumpDefault on all platforms on non-UI and non-IO threads. This CL also fixes some GCC compilation errors. I renamed MessageLoopOwnable to TaskBase, which seems more appropriate since a MessageLoopOwnable has a next Task pointer and clearly is only meaningful in the context of Task. (I wonder why it is even a separate class, but that is another issue.) I had to make the next_task / set_next_task methods public since they are used by an inner class of MessageLoop. Perhaps those inner classes should be made into top-level classes, but that seemed like too much to change at this time. R=jar,mmentovai git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1045 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/test_suite.h')
-rw-r--r--base/test_suite.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/base/test_suite.h b/base/test_suite.h
index 2362f03..ccac5c5 100644
--- a/base/test_suite.h
+++ b/base/test_suite.h
@@ -36,21 +36,17 @@
#include "build/build_config.h"
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
-
#include "base/command_line.h"
#include "base/debug_on_start.h"
#include "base/icu_util.h"
#include "base/logging.h"
-#if defined(OS_WIN)
-// TODO(pinkerton): re-enable this when MessageLoop can be included by
-// non-windows platforms.
#include "base/message_loop.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+#if defined(OS_WIN)
+#include <windows.h>
#include "base/multiprocess_test.h"
#endif
-#include "testing/gtest/include/gtest/gtest.h"
class TestSuite {
public:
@@ -59,12 +55,10 @@ class TestSuite {
}
virtual ~TestSuite() {
-#if defined(OS_WIN)
// Flush any remaining messages. This ensures that any accumulated Task
// objects get destroyed before we exit, which avoids noise in purify
// leak-test results.
message_loop_.RunAllPending();
-#endif
}
int Run() {
@@ -125,9 +119,7 @@ class TestSuite {
}
CommandLine parsed_command_line_;
-#if defined(OS_WIN)
MessageLoop message_loop_;
-#endif
};
#endif // BASE_TEST_SUITE_H_