summaryrefslogtreecommitdiffstats
path: root/chrome/common/worker_thread_ticker_unittest.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-30 14:51:40 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-30 14:51:40 +0000
commit79f066fe8717dfd6ba7a3453a18e6f4128faa9e4 (patch)
tree2d55bb97a18a652a3b16657fe2e4fbdcd3e76a17 /chrome/common/worker_thread_ticker_unittest.cc
parent790613cb3725005dda8f7fbfaa344a9e99a8f2a8 (diff)
downloadchromium_src-79f066fe8717dfd6ba7a3453a18e6f4128faa9e4.zip
chromium_src-79f066fe8717dfd6ba7a3453a18e6f4128faa9e4.tar.gz
chromium_src-79f066fe8717dfd6ba7a3453a18e6f4128faa9e4.tar.bz2
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
Diffstat (limited to 'chrome/common/worker_thread_ticker_unittest.cc')
-rw-r--r--chrome/common/worker_thread_ticker_unittest.cc6
1 files 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());