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

Unified Diff: content/browser/renderer_host/p2p/socket_host_udp_unittest.cc

Issue 13584008: Send notification about outgoing p2p packets from browser to renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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 5a5f15aa5a05966a033841d12776565b449a59e8..d7a3bec80f4e1dc74ec917363c845ce8508bfcc9 100644
--- a/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
+++ b/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
@@ -164,6 +164,11 @@ class P2PSocketHostUdpTest : public testing::Test {
// Verify that we can send STUN messages before we receive anything
// from the other side.
TEST_F(P2PSocketHostUdpTest, SendStunNoAuth) {
+ EXPECT_CALL(sender_, Send(
+ MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+ .Times(3)
+ .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
+
std::vector<char> packet1;
CreateStunRequest(&packet1);
socket_host_->Send(dest1_, packet1);
@@ -208,6 +213,9 @@ TEST_F(P2PSocketHostUdpTest, SendAfterStunRequest) {
socket_->ReceivePacket(dest1_, request_packet);
// Now we should be able to send any data to |dest1_|.
+ EXPECT_CALL(sender_, Send(
+ MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+ .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
std::vector<char> packet;
CreateRandomPacket(&packet);
socket_host_->Send(dest1_, packet);
@@ -228,6 +236,9 @@ TEST_F(P2PSocketHostUdpTest, SendAfterStunResponse) {
socket_->ReceivePacket(dest1_, request_packet);
// Now we should be able to send any data to |dest1_|.
+ EXPECT_CALL(sender_, Send(
+ MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+ .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
std::vector<char> packet;
CreateRandomPacket(&packet);
socket_host_->Send(dest1_, packet);

Powered by Google App Engine
This is Rietveld 408576698