From 79f066fe8717dfd6ba7a3453a18e6f4128faa9e4 Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Wed, 30 Dec 2009 14:51:40 +0000 Subject: Fix a race in WorkerThreadTicker test. TEST=none BUG=30582 Review URL: http://codereview.chromium.org/506073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35378 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/worker_thread_ticker_unittest.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/common/worker_thread_ticker_unittest.cc b/chrome/common/worker_thread_ticker_unittest.cc index 75e8669..71b74c8 100644 --- a/chrome/common/worker_thread_ticker_unittest.cc +++ b/chrome/common/worker_thread_ticker_unittest.cc @@ -47,8 +47,8 @@ void RunMessageLoopForAWhile() { TEST(WorkerThreadTickerTest, Basic) { MessageLoop loop; - WorkerThreadTicker ticker(50); TestCallback callback; + WorkerThreadTicker ticker(50); EXPECT_FALSE(ticker.IsRunning()); EXPECT_TRUE(ticker.RegisterTickHandler(&callback)); EXPECT_TRUE(ticker.UnregisterTickHandler(&callback)); @@ -65,8 +65,8 @@ TEST(WorkerThreadTickerTest, Basic) { TEST(WorkerThreadTickerTest, Callback) { MessageLoop loop; - WorkerThreadTicker ticker(50); TestCallback callback; + WorkerThreadTicker ticker(50); ASSERT_TRUE(ticker.RegisterTickHandler(&callback)); ASSERT_TRUE(ticker.Start()); @@ -99,8 +99,8 @@ TEST(WorkerThreadTickerTest, OutOfScope) { TEST(WorkerThreadTickerTest, LongCallback) { MessageLoop loop; - WorkerThreadTicker ticker(50); LongCallback callback; + WorkerThreadTicker ticker(50); ASSERT_TRUE(ticker.RegisterTickHandler(&callback)); ASSERT_TRUE(ticker.Start()); -- cgit v1.1