summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-29 19:05:24 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-29 19:05:24 +0000
commit426ee4c2d9ba6bbed9cc9e6013ea16c836f8eb22 (patch)
tree78f3644aa627dad3d0045eff43faca0010104c32
parentca0b3c2faedf50d5dba9d6e9ab6264b07debefea (diff)
downloadchromium_src-426ee4c2d9ba6bbed9cc9e6013ea16c836f8eb22.zip
chromium_src-426ee4c2d9ba6bbed9cc9e6013ea16c836f8eb22.tar.gz
chromium_src-426ee4c2d9ba6bbed9cc9e6013ea16c836f8eb22.tar.bz2
Hack to keep vista net_unittests from hanging while I investigate a proper fix.
TBR=rvargas git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1540 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/base/run_all_unittests.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/base/run_all_unittests.cc b/net/base/run_all_unittests.cc
index f5c1419b..7acfa54 100644
--- a/net/base/run_all_unittests.cc
+++ b/net/base/run_all_unittests.cc
@@ -29,6 +29,7 @@
#include "base/message_loop.h"
#include "base/test_suite.h"
+#include "base/timer.h"
class NetTestSuite : public TestSuite {
public:
@@ -39,6 +40,13 @@ class NetTestSuite : public TestSuite {
TestSuite::Initialize();
message_loop_.reset(new MessageLoopForIO());
+
+ // TODO(darin): Remove this god awful, son of a wart toad hack. This timer
+ // keeps the MessageLoop pumping, which avoids a hang on Vista. The real
+ // fix lies elsewhere, but this is a stop-gap to keep the tests running on
+ // Vista in the meantime.
+ keep_looping_.Start(
+ TimeDelta::FromMilliseconds(100), this, &NetTestSuite::DoNothing);
}
virtual void Shutdown() {
@@ -50,7 +58,10 @@ class NetTestSuite : public TestSuite {
}
private:
+ void DoNothing() {}
+
scoped_ptr<MessageLoop> message_loop_;
+ base::RepeatingTimer<NetTestSuite> keep_looping_;
};
int main(int argc, char** argv) {