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

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

Issue 1871693004: Fix AllocationSequence to handle the case when TurnPort stops using shared socket. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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
« no previous file with comments | « webrtc/p2p/base/turnport.cc ('k') | webrtc/p2p/client/basicportallocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/turnport_unittest.cc
diff --git a/webrtc/p2p/base/turnport_unittest.cc b/webrtc/p2p/base/turnport_unittest.cc
index 2c93ead9dfacb701c042ab7cc85d594fa991de72..901d25cdb238b24a0e4b77685df247ca4877e7d8 100644
--- a/webrtc/p2p/base/turnport_unittest.cc
+++ b/webrtc/p2p/base/turnport_unittest.cc
@@ -665,6 +665,13 @@ TEST_F(TurnPortTest, TestTurnAllocateMismatch) {
// Verifies that the new port has a different address now.
EXPECT_NE(first_addr, turn_port_->socket()->GetLocalAddress());
+
+ // Verify that all packets received from the shared socket are ignored.
+ std::string test_packet = "Test packet";
+ EXPECT_FALSE(turn_port_->HandleIncomingPacket(
+ socket_.get(), test_packet.data(), test_packet.size(),
+ rtc::SocketAddress(kTurnUdpExtAddr.ipaddr(), 0),
+ rtc::CreatePacketTime(0)));
}
// Tests that a shared-socket-TurnPort creates its own socket after
« no previous file with comments | « webrtc/p2p/base/turnport.cc ('k') | webrtc/p2p/client/basicportallocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698