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

Side by Side Diff: base/synchronization/waitable_event_watcher_unittest.cc

Issue 2103333006: Remove calls to deprecated MessageLoop methods in base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « base/sequence_checker_unittest.cc ('k') | base/test/launcher/test_launcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/synchronization/waitable_event_watcher.h" 5 #include "base/synchronization/waitable_event_watcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 WaitableEvent::InitialState::NOT_SIGNALED); 52 WaitableEvent::InitialState::NOT_SIGNALED);
53 53
54 WaitableEventWatcher watcher; 54 WaitableEventWatcher watcher;
55 EXPECT_TRUE(watcher.GetWatchedEvent() == NULL); 55 EXPECT_TRUE(watcher.GetWatchedEvent() == NULL);
56 56
57 watcher.StartWatching(&event, Bind(&QuitWhenSignaled)); 57 watcher.StartWatching(&event, Bind(&QuitWhenSignaled));
58 EXPECT_EQ(&event, watcher.GetWatchedEvent()); 58 EXPECT_EQ(&event, watcher.GetWatchedEvent());
59 59
60 event.Signal(); 60 event.Signal();
61 61
62 MessageLoop::current()->Run(); 62 RunLoop().Run();
63 63
64 EXPECT_TRUE(watcher.GetWatchedEvent() == NULL); 64 EXPECT_TRUE(watcher.GetWatchedEvent() == NULL);
65 } 65 }
66 66
67 void RunTest_BasicCancel(MessageLoop::Type message_loop_type) { 67 void RunTest_BasicCancel(MessageLoop::Type message_loop_type) {
68 MessageLoop message_loop(message_loop_type); 68 MessageLoop message_loop(message_loop_type);
69 69
70 // A manual-reset event that is not yet signaled. 70 // A manual-reset event that is not yet signaled.
71 WaitableEvent event(WaitableEvent::ResetPolicy::MANUAL, 71 WaitableEvent event(WaitableEvent::ResetPolicy::MANUAL,
72 WaitableEvent::InitialState::NOT_SIGNALED); 72 WaitableEvent::InitialState::NOT_SIGNALED);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 #else 175 #else
176 #define MAYBE_DeleteUnder DeleteUnder 176 #define MAYBE_DeleteUnder DeleteUnder
177 #endif 177 #endif
178 TEST(WaitableEventWatcherTest, MAYBE_DeleteUnder) { 178 TEST(WaitableEventWatcherTest, MAYBE_DeleteUnder) {
179 for (int i = 0; i < kNumTestingMessageLoops; i++) { 179 for (int i = 0; i < kNumTestingMessageLoops; i++) {
180 RunTest_DeleteUnder(testing_message_loops[i]); 180 RunTest_DeleteUnder(testing_message_loops[i]);
181 } 181 }
182 } 182 }
183 183
184 } // namespace base 184 } // namespace base
OLDNEW
« no previous file with comments | « base/sequence_checker_unittest.cc ('k') | base/test/launcher/test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698