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

Unified Diff: base/threading/sequenced_worker_pool_unittest.cc

Issue 2032603002: Migrate WaitableEvent to enum-based constructor in base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: undo incorrect template change Created 4 years, 7 months 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 | « base/threading/sequenced_task_runner_handle_unittest.cc ('k') | base/threading/simple_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/sequenced_worker_pool_unittest.cc
diff --git a/base/threading/sequenced_worker_pool_unittest.cc b/base/threading/sequenced_worker_pool_unittest.cc
index 58dc317a398780655848373123173d7c1855269f..d73b4f20e09121264e57c4242c9323f7c805dd3a 100644
--- a/base/threading/sequenced_worker_pool_unittest.cc
+++ b/base/threading/sequenced_worker_pool_unittest.cc
@@ -966,7 +966,8 @@ TEST_F(SequencedWorkerPoolTest, GetSequencedTaskRunnerForCurrentThread) {
SequencedWorkerPool::GetSequencedTaskRunnerForCurrentThread();
EXPECT_FALSE(local_task_runner);
- WaitableEvent event(false, false);
+ WaitableEvent event(WaitableEvent::ResetPolicy::AUTOMATIC,
+ WaitableEvent::InitialState::NOT_SIGNALED);
Closure signal = Bind(&WaitableEvent::Signal, Unretained(&event));
scoped_refptr<SequencedTaskRunner> task_runner_1 =
pool()->GetSequencedTaskRunner(SequencedWorkerPool::GetSequenceToken());
@@ -1025,7 +1026,8 @@ void VerifySequenceOnDestruction(const Closure& callback) {
TEST_F(SequencedWorkerPoolTest, CheckSequenceOnDestruction) {
EnsureAllWorkersCreated();
- WaitableEvent event(false, false);
+ WaitableEvent event(WaitableEvent::ResetPolicy::AUTOMATIC,
+ WaitableEvent::InitialState::NOT_SIGNALED);
Closure signal = Bind(&WaitableEvent::Signal, Unretained(&event));
pool()->PostWorkerTask(FROM_HERE, Bind(&VerifySequenceOnDestruction, signal));
event.Wait();
« no previous file with comments | « base/threading/sequenced_task_runner_handle_unittest.cc ('k') | base/threading/simple_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698