Index: webrtc/p2p/base/portallocator_unittest.cc |
diff --git a/webrtc/p2p/base/portallocator_unittest.cc b/webrtc/p2p/base/portallocator_unittest.cc |
index ac1c862f5f37552e3290853ccca4c60a52cbab08..b9f6a373fb229cb6141893cdd5ca50c29d292cd4 100644 |
--- a/webrtc/p2p/base/portallocator_unittest.cc |
+++ b/webrtc/p2p/base/portallocator_unittest.cc |
@@ -11,7 +11,9 @@ |
#include <memory> |
#include "webrtc/base/gunit.h" |
+#include "webrtc/base/physicalsocketserver.h" |
#include "webrtc/base/thread.h" |
+#include "webrtc/base/virtualsocketserver.h" |
#include "webrtc/p2p/base/fakeportallocator.h" |
#include "webrtc/p2p/base/portallocator.h" |
@@ -25,7 +27,10 @@ static const char kTurnPassword[] = "test"; |
class PortAllocatorTest : public testing::Test, public sigslot::has_slots<> { |
public: |
- PortAllocatorTest() { |
+ PortAllocatorTest() |
+ : pss_(new rtc::PhysicalSocketServer), |
+ vss_(new rtc::VirtualSocketServer(pss_.get())), |
+ main_(vss_.get()) { |
allocator_.reset( |
new cricket::FakePortAllocator(rtc::Thread::Current(), nullptr)); |
} |
@@ -76,6 +81,9 @@ class PortAllocatorTest : public testing::Test, public sigslot::has_slots<> { |
return count; |
} |
+ std::unique_ptr<rtc::PhysicalSocketServer> pss_; |
+ std::unique_ptr<rtc::VirtualSocketServer> vss_; |
+ rtc::AutoSocketServerThread main_; |
std::unique_ptr<cricket::FakePortAllocator> allocator_; |
rtc::SocketAddress stun_server_1{"11.11.11.11", 3478}; |
rtc::SocketAddress stun_server_2{"22.22.22.22", 3478}; |