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

Unified Diff: base/task_scheduler/task_tracker_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/task_scheduler_impl_unittest.cc ('k') | base/test/test_io_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_tracker_unittest.cc
diff --git a/base/task_scheduler/task_tracker_unittest.cc b/base/task_scheduler/task_tracker_unittest.cc
index 8f04f3a02e35636e2c2a018ba93cfb2bc4a7bd98..ea924ce89499afe3d48ad2a4789d1d9277047201 100644
--- a/base/task_scheduler/task_tracker_unittest.cc
+++ b/base/task_scheduler/task_tracker_unittest.cc
@@ -36,7 +36,8 @@ class ThreadCallingShutdown : public SimpleThread {
explicit ThreadCallingShutdown(TaskTracker* tracker)
: SimpleThread("ThreadCallingShutdown"),
tracker_(tracker),
- has_returned_(true, false) {}
+ has_returned_(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED) {}
// Returns true once the async call to Shutdown() has returned.
bool has_returned() { return has_returned_.IsSignaled(); }
@@ -163,7 +164,8 @@ TEST_P(TaskSchedulerTaskTrackerTest, WillPostAndRunBeforeShutdown) {
TEST_P(TaskSchedulerTaskTrackerTest, WillPostAndRunLongTaskBeforeShutdown) {
// Create a task that will block until |event| is signaled.
- WaitableEvent event(false, false);
+ WaitableEvent event(WaitableEvent::ResetPolicy::AUTOMATIC,
+ WaitableEvent::InitialState::NOT_SIGNALED);
std::unique_ptr<Task> blocked_task(
new Task(FROM_HERE, Bind(&WaitableEvent::Wait, Unretained(&event)),
TaskTraits().WithShutdownBehavior(GetParam()), TimeDelta()));
« no previous file with comments | « base/task_scheduler/task_scheduler_impl_unittest.cc ('k') | base/test/test_io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698