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

Unified Diff: third_party/crashpad/crashpad/util/synchronization/semaphore_test.cc

Issue 2825103002: Update Crashpad to b8aaa22905308cc400f880006a84dddac834bd6b (Closed)
Patch Set: Created 3 years, 8 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
Index: third_party/crashpad/crashpad/util/synchronization/semaphore_test.cc
diff --git a/third_party/crashpad/crashpad/util/synchronization/semaphore_test.cc b/third_party/crashpad/crashpad/util/synchronization/semaphore_test.cc
index fb4338c05ba0a8406bc4b3dbff89fab6844d0af9..ccaf742dd34e79675f8eae06b52b4c718bf036f8 100644
--- a/third_party/crashpad/crashpad/util/synchronization/semaphore_test.cc
+++ b/third_party/crashpad/crashpad/util/synchronization/semaphore_test.cc
@@ -43,6 +43,18 @@ TEST(Semaphore, TimedWaitTimeout) {
EXPECT_FALSE(semaphore.TimedWait(0.01)); // 10ms
}
+TEST(Semaphore, TimedWaitInfinite_0) {
+ Semaphore semaphore(0);
+ semaphore.Signal();
+ EXPECT_TRUE(semaphore.TimedWait(std::numeric_limits<double>::infinity()));
+}
+
+TEST(Semaphore, TimedWaitInfinite_1) {
+ Semaphore semaphore(1);
+ EXPECT_TRUE(semaphore.TimedWait(std::numeric_limits<double>::infinity()));
+ semaphore.Signal();
+}
+
struct ThreadMainInfo {
#if defined(OS_POSIX)
pthread_t pthread;

Powered by Google App Engine
This is Rietveld 408576698