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

Unified Diff: webrtc/base/platform_thread_unittest.cc

Issue 2720223003: Add a DCHECK for PlatformThread instances that are too busy. (Closed)
Patch Set: 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/base/platform_thread_unittest.cc
diff --git a/webrtc/base/platform_thread_unittest.cc b/webrtc/base/platform_thread_unittest.cc
index d6d35e40e4955dfe82367ac29e3ed2de00c1efbf..b11e336df20bae25869c2b4c3a16c1656457f8df 100644
--- a/webrtc/base/platform_thread_unittest.cc
+++ b/webrtc/base/platform_thread_unittest.cc
@@ -21,6 +21,11 @@ bool NullRunFunctionDeprecated(void* obj) {
return true;
}
+bool TooBusyRunFunction(void* obj) {
+ // Indentionally busy looping.
+ return true;
+}
+
void NullRunFunction(void* obj) {}
// Function that sets a boolean.
@@ -108,4 +113,11 @@ TEST(PlatformThreadTest, RunFunctionIsCalled) {
EXPECT_TRUE(flag);
}
+TEST(PlatformThreadTest, DISABLED_TooBusyDeprecated) {
+ PlatformThread thread(&TooBusyRunFunction, nullptr, "BusyThread");
+ thread.Start();
+ webrtc::SleepMs(1000);
+ thread.Stop();
+}
+
} // rtc
« 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