| Index: content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
|
| diff --git a/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc b/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
|
| index 66275114d6109d97c494034129286edbe455f90b..4b68cd519dcc7c3a2af1856f57c407805c2d7df5 100644
|
| --- a/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
|
| +++ b/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
|
| @@ -281,6 +281,19 @@ TEST_F(P2PSocketHostUdpTest, SendDataNoAuth) {
|
| ASSERT_EQ(sent_packets_.size(), 0U);
|
| }
|
|
|
| +// Verify that SetOption() doesn't crash after an error.
|
| +TEST_F(P2PSocketHostUdpTest, SetOptionAfterError) {
|
| + // Get the sender into the error state.
|
| + EXPECT_CALL(sender_,
|
| + Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnError::ID))))
|
| + .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
|
| + socket_host_->Send(dest1_, {1, 2, 3, 4}, rtc::PacketOptions(), 0);
|
| + testing::Mock::VerifyAndClearExpectations(&sender_);
|
| +
|
| + // Verify that SetOptions() fails, but doesn't crash.
|
| + EXPECT_FALSE(socket_host_->SetOption(P2P_SOCKET_OPT_RCVBUF, 2048));
|
| +}
|
| +
|
| // Verify that we can send data after we've received STUN request
|
| // from the other side.
|
| TEST_F(P2PSocketHostUdpTest, SendAfterStunRequest) {
|
|
|