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

Unified Diff: base/task_scheduler/scheduler_service_thread_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/task_scheduler/scheduler_lock_unittest.cc ('k') | base/task_scheduler/scheduler_thread_pool_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/scheduler_service_thread_unittest.cc
diff --git a/base/task_scheduler/scheduler_service_thread_unittest.cc b/base/task_scheduler/scheduler_service_thread_unittest.cc
index e40df884228a4f16be5aa6f7307bdd8e331ce1df..692c8f00a77451b8a6c0b9d85c86ac77aca3c845 100644
--- a/base/task_scheduler/scheduler_service_thread_unittest.cc
+++ b/base/task_scheduler/scheduler_service_thread_unittest.cc
@@ -98,7 +98,8 @@ class TaskSchedulerServiceThreadTest : public testing::Test {
// Tests that the service thread can handle a single delayed task.
TEST_F(TaskSchedulerServiceThreadTest, RunSingleDelayedTask) {
- WaitableEvent event(true, false);
+ WaitableEvent event(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
delayed_task_manager().AddDelayedTask(
WrapUnique(new Task(FROM_HERE,
Bind(&WaitableEvent::Signal, Unretained(&event)),
@@ -122,14 +123,16 @@ TEST_F(TaskSchedulerServiceThreadTest, RunMultipleDelayedTasks) {
const TimeDelta delay1 = TimeDelta::FromMilliseconds(100);
const TimeDelta delay2 = TimeDelta::FromMilliseconds(200);
- WaitableEvent event1(true, false);
+ WaitableEvent event1(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
delayed_task_manager().AddDelayedTask(
WrapUnique(new Task(FROM_HERE,
Bind(&WaitableEvent::Signal, Unretained(&event1)),
TaskTraits(), delay1)),
make_scoped_refptr(new Sequence), nullptr, thread_pool());
- WaitableEvent event2(true, false);
+ WaitableEvent event2(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
delayed_task_manager().AddDelayedTask(
WrapUnique(new Task(FROM_HERE,
Bind(&WaitableEvent::Signal, Unretained(&event2)),
« no previous file with comments | « base/task_scheduler/scheduler_lock_unittest.cc ('k') | base/task_scheduler/scheduler_thread_pool_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698