diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-26 19:48:34 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-26 19:48:34 +0000 |
commit | 097ae5a93a863b604fd6dbd939bed0c2be1afed2 (patch) | |
tree | 61177362b1c1bd2d1b2438acc50ccb2c061b176e /base/test | |
parent | 902c971382790170852fe5b5d22d1b79adb31056 (diff) | |
download | chromium_src-097ae5a93a863b604fd6dbd939bed0c2be1afed2.zip chromium_src-097ae5a93a863b604fd6dbd939bed0c2be1afed2.tar.gz chromium_src-097ae5a93a863b604fd6dbd939bed0c2be1afed2.tar.bz2 |
Make SystemMonitor not a Singleton and move it out of base
SystemMonitor makes an assumption that through its lifetime a MessageLoop exists and stays the same. It is difficult and error-prone to satisfy that when it is a Singleton. It has caused problems in the past.
Additionally, extract HighResoltionTimerManager out of time_win.cc, eliminating yet another Singleton.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/431008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/test')
-rw-r--r-- | base/test/test_suite.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/base/test/test_suite.h b/base/test/test_suite.h index 44e8511..2566b1a 100644 --- a/base/test/test_suite.h +++ b/base/test/test_suite.h @@ -182,10 +182,10 @@ class TestSuite { CHECK(base::EnableInProcessStackDumping()); #if defined(OS_WIN) - // For unit tests we turn on the high resolution timer and disable - // base::Time's use of SystemMonitor. Tests create and destroy the message - // loop, which causes a crash with SystemMonitor (http://crbug.com/12187). - base::Time::EnableHiResClockForTests(); + // Make sure we run with high resolution timer to minimize differences + // between production code and test code. + bool result = base::Time::UseHighResolutionTimer(true); + CHECK(result); // In some cases, we do not want to see standard error dialogs. if (!IsDebuggerPresent() && |