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

Unified Diff: base/synchronization/waitable_event_watcher_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/synchronization/waitable_event_unittest.cc ('k') | base/task_scheduler/priority_queue_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/synchronization/waitable_event_watcher_unittest.cc
diff --git a/base/synchronization/waitable_event_watcher_unittest.cc b/base/synchronization/waitable_event_watcher_unittest.cc
index 58444b3c4ef2b861cb66e5bc71e4f340289271b0..6ec55cedea94addfcf79892f84228aba78d9650c 100644
--- a/base/synchronization/waitable_event_watcher_unittest.cc
+++ b/base/synchronization/waitable_event_watcher_unittest.cc
@@ -48,7 +48,8 @@ void RunTest_BasicSignal(MessageLoop::Type message_loop_type) {
MessageLoop message_loop(message_loop_type);
// A manual-reset event that is not yet signaled.
- WaitableEvent event(true, false);
+ WaitableEvent event(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
WaitableEventWatcher watcher;
EXPECT_TRUE(watcher.GetWatchedEvent() == NULL);
@@ -67,7 +68,8 @@ void RunTest_BasicCancel(MessageLoop::Type message_loop_type) {
MessageLoop message_loop(message_loop_type);
// A manual-reset event that is not yet signaled.
- WaitableEvent event(true, false);
+ WaitableEvent event(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
WaitableEventWatcher watcher;
@@ -80,7 +82,8 @@ void RunTest_CancelAfterSet(MessageLoop::Type message_loop_type) {
MessageLoop message_loop(message_loop_type);
// A manual-reset event that is not yet signaled.
- WaitableEvent event(true, false);
+ WaitableEvent event(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
WaitableEventWatcher watcher;
@@ -108,7 +111,8 @@ void RunTest_OutlivesMessageLoop(MessageLoop::Type message_loop_type) {
// Simulate a MessageLoop that dies before an WaitableEventWatcher. This
// ordinarily doesn't happen when people use the Thread class, but it can
// happen when people use the Singleton pattern or atexit.
- WaitableEvent event(true, false);
+ WaitableEvent event(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED);
{
WaitableEventWatcher watcher;
{
@@ -128,7 +132,9 @@ void RunTest_DeleteUnder(MessageLoop::Type message_loop_type) {
{
WaitableEventWatcher watcher;
- WaitableEvent* event = new WaitableEvent(false, false);
+ WaitableEvent* event =
+ new WaitableEvent(WaitableEvent::ResetPolicy::AUTOMATIC,
+ WaitableEvent::InitialState::NOT_SIGNALED);
watcher.StartWatching(event, Bind(&QuitWhenSignaled));
delete event;
« no previous file with comments | « base/synchronization/waitable_event_unittest.cc ('k') | base/task_scheduler/priority_queue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698