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 |