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

Unified Diff: webrtc/pc/proxy_unittest.cc

Issue 2977953002: Partial Reland of Make the default ctor of rtc::Thread, protected (Closed)
Patch Set: Fix the same error elsewhere Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/pc/peerconnectioninterface_unittest.cc ('k') | webrtc/pc/rtcstats_integrationtest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/proxy_unittest.cc
diff --git a/webrtc/pc/proxy_unittest.cc b/webrtc/pc/proxy_unittest.cc
index 0d97c4174f01c31bad5ebf248742322bf9b6a765..c21599d351ec8395226ffca1cdaa3e0aff938e17 100644
--- a/webrtc/pc/proxy_unittest.cc
+++ b/webrtc/pc/proxy_unittest.cc
@@ -95,7 +95,7 @@ class SignalingProxyTest : public testing::Test {
protected:
void SetUp() override {
- signaling_thread_.reset(new rtc::Thread());
+ signaling_thread_ = rtc::Thread::Create();
ASSERT_TRUE(signaling_thread_->Start());
fake_ = Fake::Create();
fake_signaling_proxy_ =
@@ -182,8 +182,8 @@ class ProxyTest : public testing::Test {
protected:
void SetUp() override {
- signaling_thread_.reset(new rtc::Thread());
- worker_thread_.reset(new rtc::Thread());
+ signaling_thread_ = rtc::Thread::Create();
+ worker_thread_ = rtc::Thread::Create();
ASSERT_TRUE(signaling_thread_->Start());
ASSERT_TRUE(worker_thread_->Start());
fake_ = Fake::Create();
@@ -283,20 +283,22 @@ END_PROXY_MAP()
class OwnedProxyTest : public testing::Test {
public:
OwnedProxyTest()
- : foo_(new Foo()),
- foo_proxy_(FooProxy::Create(&signaling_thread_,
- &worker_thread_,
+ : signaling_thread_(rtc::Thread::Create()),
+ worker_thread_(rtc::Thread::Create()),
+ foo_(new Foo()),
+ foo_proxy_(FooProxy::Create(signaling_thread_.get(),
+ worker_thread_.get(),
std::unique_ptr<FooInterface>(foo_))) {
- signaling_thread_.Start();
- worker_thread_.Start();
+ signaling_thread_->Start();
+ worker_thread_->Start();
}
- void CheckSignalingThread() { EXPECT_TRUE(signaling_thread_.IsCurrent()); }
- void CheckWorkerThread() { EXPECT_TRUE(worker_thread_.IsCurrent()); }
+ void CheckSignalingThread() { EXPECT_TRUE(signaling_thread_->IsCurrent()); }
+ void CheckWorkerThread() { EXPECT_TRUE(worker_thread_->IsCurrent()); }
protected:
- rtc::Thread signaling_thread_;
- rtc::Thread worker_thread_;
+ std::unique_ptr<rtc::Thread> signaling_thread_;
+ std::unique_ptr<rtc::Thread> worker_thread_;
Foo* foo_; // Owned by foo_proxy_, not this class.
std::unique_ptr<FooInterface> foo_proxy_;
};
« no previous file with comments | « webrtc/pc/peerconnectioninterface_unittest.cc ('k') | webrtc/pc/rtcstats_integrationtest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698