aboutsummaryrefslogtreecommitdiff
path: root/webrtc/system_wrappers/source/critical_section_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webrtc/system_wrappers/source/critical_section_unittest.cc')
-rw-r--r--webrtc/system_wrappers/source/critical_section_unittest.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/webrtc/system_wrappers/source/critical_section_unittest.cc b/webrtc/system_wrappers/source/critical_section_unittest.cc
index 6848bdd06b..9abf8b8017 100644
--- a/webrtc/system_wrappers/source/critical_section_unittest.cc
+++ b/webrtc/system_wrappers/source/critical_section_unittest.cc
@@ -12,7 +12,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/system_wrappers/include/sleep.h"
-#include "webrtc/system_wrappers/include/thread_wrapper.h"
+#include "webrtc/base/platform_thread.h"
#include "webrtc/system_wrappers/include/trace.h"
namespace webrtc {
@@ -78,10 +78,10 @@ TEST_F(CritSectTest, ThreadWakesOnce) NO_THREAD_SAFETY_ANALYSIS {
CriticalSectionWrapper* crit_sect =
CriticalSectionWrapper::CreateCriticalSection();
ProtectedCount count(crit_sect);
- rtc::scoped_ptr<ThreadWrapper> thread = ThreadWrapper::CreateThread(
+ rtc::PlatformThread thread(
&LockUnlockThenStopRunFunction, &count, "ThreadWakesOnce");
crit_sect->Enter();
- ASSERT_TRUE(thread->Start());
+ thread.Start();
SwitchProcess();
// The critical section is of reentrant mode, so this should not release
// the lock, even though count.Count() locks and unlocks the critical section
@@ -90,7 +90,7 @@ TEST_F(CritSectTest, ThreadWakesOnce) NO_THREAD_SAFETY_ANALYSIS {
ASSERT_EQ(0, count.Count());
crit_sect->Leave(); // This frees the thread to act.
EXPECT_TRUE(WaitForCount(1, &count));
- EXPECT_TRUE(thread->Stop());
+ thread.Stop();
delete crit_sect;
}
@@ -105,10 +105,10 @@ TEST_F(CritSectTest, ThreadWakesTwice) NO_THREAD_SAFETY_ANALYSIS {
CriticalSectionWrapper* crit_sect =
CriticalSectionWrapper::CreateCriticalSection();
ProtectedCount count(crit_sect);
- rtc::scoped_ptr<ThreadWrapper> thread = ThreadWrapper::CreateThread(
+ rtc::PlatformThread thread(
&LockUnlockRunFunction, &count, "ThreadWakesTwice");
crit_sect->Enter(); // Make sure counter stays 0 until we wait for it.
- ASSERT_TRUE(thread->Start());
+ thread.Start();
crit_sect->Leave();
// The thread is capable of grabbing the lock multiple times,
@@ -128,7 +128,7 @@ TEST_F(CritSectTest, ThreadWakesTwice) NO_THREAD_SAFETY_ANALYSIS {
SwitchProcess();
EXPECT_TRUE(WaitForCount(count_before + 1, &count));
- EXPECT_TRUE(thread->Stop());
+ thread.Stop();
delete crit_sect;
}