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

Unified Diff: net/dns/mdns_client_unittest.cc

Issue 581813004: Enqueue mDns requests if send on socket in progress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fri Sep 19 14:33:02 PDT 2014 Created 6 years, 3 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
« net/dns/mdns_client_impl.cc ('K') | « net/dns/mdns_client_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/mdns_client_unittest.cc
diff --git a/net/dns/mdns_client_unittest.cc b/net/dns/mdns_client_unittest.cc
index e872d8b6cec79c75e531cd16051259710fa2e62c..94811319b9cd2e24c79783ddfe3c212040ca75ff 100644
--- a/net/dns/mdns_client_unittest.cc
+++ b/net/dns/mdns_client_unittest.cc
@@ -1123,6 +1123,7 @@ TEST_F(MDnsConnectionTest, ReceiveSynchronous) {
EXPECT_CALL(delegate_, HandlePacketInternal(sample_packet));
ASSERT_TRUE(InitConnection());
+ base::MessageLoop::current()->RunUntilIdle();
}
TEST_F(MDnsConnectionTest, ReceiveAsynchronous) {
@@ -1139,7 +1140,6 @@ TEST_F(MDnsConnectionTest, ReceiveAsynchronous) {
ASSERT_TRUE(InitConnection());
EXPECT_CALL(delegate_, HandlePacketInternal(sample_packet));
-
base::MessageLoop::current()->RunUntilIdle();
}
@@ -1163,7 +1163,8 @@ TEST_F(MDnsConnectionTest, Send) {
EXPECT_CALL(*socket_ipv6_,
SendToInternal(sample_packet, "[ff02::fb]:5353", _));
- connection_.Send(buf.get(), buf->size());
+ connection_.Send(buf);
+ base::MessageLoop::current()->RunUntilIdle();
}
TEST_F(MDnsConnectionTest, Error) {
@@ -1178,6 +1179,7 @@ TEST_F(MDnsConnectionTest, Error) {
EXPECT_CALL(delegate_, OnConnectionError(ERR_SOCKET_NOT_CONNECTED));
callback.Run(ERR_SOCKET_NOT_CONNECTED);
+ base::MessageLoop::current()->RunUntilIdle();
}
Ryan Hamilton 2014/09/22 19:26:44 I don't see any tests of the new behavior. Specifi
Vitaly Buka (NO REVIEWS) 2014/09/22 22:53:49 Done.
} // namespace
« net/dns/mdns_client_impl.cc ('K') | « net/dns/mdns_client_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698