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

Unified Diff: webrtc/modules/utility/source/process_thread_impl_unittest.cc

Issue 2708433002: Replace the stop_event_ in PlatformThread with an atomic flag (Closed)
Patch Set: Update ProcessThreadImpl tests to not always return 0. Guessing it may be causing bot problems Created 3 years, 10 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
« webrtc/base/platform_thread.cc ('K') | « webrtc/base/platform_thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/utility/source/process_thread_impl_unittest.cc
diff --git a/webrtc/modules/utility/source/process_thread_impl_unittest.cc b/webrtc/modules/utility/source/process_thread_impl_unittest.cc
index 8f25b112a9fab5b57f2d1d034d466019ba6979f8..fae4c078841f9f903755a12e2033cfe2aa375f88 100644
--- a/webrtc/modules/utility/source/process_thread_impl_unittest.cc
+++ b/webrtc/modules/utility/source/process_thread_impl_unittest.cc
@@ -85,7 +85,9 @@ TEST(ProcessThreadImpl, ProcessCall) {
std::unique_ptr<EventWrapper> event(EventWrapper::Create());
MockModule module;
- EXPECT_CALL(module, TimeUntilNextProcess()).WillRepeatedly(Return(0));
+ EXPECT_CALL(module, TimeUntilNextProcess())
+ .WillOnce(Return(0))
+ .WillRepeatedly(Return(1));
EXPECT_CALL(module, Process())
.WillOnce(DoAll(SetEvent(event.get()), Return()))
.WillRepeatedly(Return());
@@ -105,7 +107,9 @@ TEST(ProcessThreadImpl, ProcessCall2) {
std::unique_ptr<EventWrapper> event(EventWrapper::Create());
MockModule module;
- EXPECT_CALL(module, TimeUntilNextProcess()).WillRepeatedly(Return(0));
+ EXPECT_CALL(module, TimeUntilNextProcess())
+ .WillOnce(Return(0))
+ .WillRepeatedly(Return(1));
EXPECT_CALL(module, Process())
.WillOnce(DoAll(SetEvent(event.get()), Return()))
.WillRepeatedly(Return());
@@ -128,7 +132,9 @@ TEST(ProcessThreadImpl, Deregister) {
int process_count = 0;
MockModule module;
- EXPECT_CALL(module, TimeUntilNextProcess()).WillRepeatedly(Return(0));
+ EXPECT_CALL(module, TimeUntilNextProcess())
+ .WillOnce(Return(0))
+ .WillRepeatedly(Return(1));
EXPECT_CALL(module, Process())
.WillOnce(DoAll(SetEvent(event.get()),
Increment(&process_count),
« webrtc/base/platform_thread.cc ('K') | « webrtc/base/platform_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698