Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9189)

Unified Diff: chrome/common/worker_thread_ticker_unittest.cc

Issue 506073: Fix a race in WorkerThreadTicker test. (Closed)
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/worker_thread_ticker_unittest.cc
diff --git a/chrome/common/worker_thread_ticker_unittest.cc b/chrome/common/worker_thread_ticker_unittest.cc
index 75e86691662a4783d73e0ce410e03e31b5e40216..71b74c8ace962819f90b9ea33fa5942cc32d9206 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());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698