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

Unified Diff: webrtc/p2p/base/portallocator_unittest.cc

Issue 2881973002: Get tests working on systems that only support IPv6. (Closed)
Patch Set: Created 3 years, 7 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: 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};

Powered by Google App Engine
This is Rietveld 408576698