| Index: trunk/src/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc
|
| ===================================================================
|
| --- trunk/src/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc (revision 252899)
|
| +++ trunk/src/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc (working copy)
|
| @@ -92,18 +92,17 @@
|
| .Times(3)
|
| .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
|
|
|
| - talk_base::PacketOptions options;
|
| std::vector<char> packet1;
|
| CreateStunRequest(&packet1);
|
| - socket_host_->Send(dest_, packet1, options, 0);
|
| + socket_host_->Send(dest_, packet1, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::vector<char> packet2;
|
| CreateStunResponse(&packet2);
|
| - socket_host_->Send(dest_, packet2, options, 0);
|
| + socket_host_->Send(dest_, packet2, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::vector<char> packet3;
|
| CreateStunError(&packet3);
|
| - socket_host_->Send(dest_, packet3, options, 0);
|
| + socket_host_->Send(dest_, packet3, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::string expected_data;
|
| expected_data.append(IntToSize(packet1.size()));
|
| @@ -124,18 +123,17 @@
|
| .Times(3)
|
| .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
|
|
|
| - talk_base::PacketOptions options;
|
| std::vector<char> packet1;
|
| CreateStunRequest(&packet1);
|
| - socket_host_->Send(dest_, packet1, options, 0);
|
| + socket_host_->Send(dest_, packet1, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::vector<char> packet2;
|
| CreateStunResponse(&packet2);
|
| - socket_host_->Send(dest_, packet2, options, 0);
|
| + socket_host_->Send(dest_, packet2, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::vector<char> packet3;
|
| CreateStunError(&packet3);
|
| - socket_host_->Send(dest_, packet3, options, 0);
|
| + socket_host_->Send(dest_, packet3, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::string received_data;
|
| received_data.append(IntToSize(packet1.size()));
|
| @@ -171,10 +169,9 @@
|
| MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID))))
|
| .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
|
|
|
| - talk_base::PacketOptions options;
|
| std::vector<char> packet;
|
| CreateRandomPacket(&packet);
|
| - socket_host_->Send(dest_, packet, options, 0);
|
| + socket_host_->Send(dest_, packet, net::DSCP_NO_CHANGE, 0);
|
|
|
| EXPECT_EQ(0U, sent_data_.size());
|
| }
|
| @@ -182,7 +179,6 @@
|
| // Verify that we can send data after we've received STUN response
|
| // from the other side.
|
| TEST_F(P2PSocketHostTcpTest, SendAfterStunRequest) {
|
| - talk_base::PacketOptions options;
|
| // Receive packet from |dest_|.
|
| std::vector<char> request_packet;
|
| CreateStunRequest(&request_packet);
|
| @@ -201,7 +197,7 @@
|
| // Now we should be able to send any data to |dest_|.
|
| std::vector<char> packet;
|
| CreateRandomPacket(&packet);
|
| - socket_host_->Send(dest_, packet, options, 0);
|
| + socket_host_->Send(dest_, packet, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::string expected_data;
|
| expected_data.append(IntToSize(packet.size()));
|
| @@ -213,7 +209,6 @@
|
| // Verify that asynchronous writes are handled correctly.
|
| TEST_F(P2PSocketHostTcpTest, AsyncWrites) {
|
| base::MessageLoop message_loop;
|
| - talk_base::PacketOptions options;
|
|
|
| socket_->set_async_write(true);
|
|
|
| @@ -225,11 +220,11 @@
|
| std::vector<char> packet1;
|
| CreateStunRequest(&packet1);
|
|
|
| - socket_host_->Send(dest_, packet1, options, 0);
|
| + socket_host_->Send(dest_, packet1, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::vector<char> packet2;
|
| CreateStunResponse(&packet2);
|
| - socket_host_->Send(dest_, packet2, options, 0);
|
| + socket_host_->Send(dest_, packet2, net::DSCP_NO_CHANGE, 0);
|
|
|
| message_loop.RunUntilIdle();
|
|
|
| @@ -250,18 +245,17 @@
|
| .Times(3)
|
| .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
|
|
|
| - talk_base::PacketOptions options;
|
| std::vector<char> packet1;
|
| CreateStunRequest(&packet1);
|
| - socket_host_->Send(dest_, packet1, options, 0);
|
| + socket_host_->Send(dest_, packet1, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::vector<char> packet2;
|
| CreateStunResponse(&packet2);
|
| - socket_host_->Send(dest_, packet2, options, 0);
|
| + socket_host_->Send(dest_, packet2, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::vector<char> packet3;
|
| CreateStunError(&packet3);
|
| - socket_host_->Send(dest_, packet3, options, 0);
|
| + socket_host_->Send(dest_, packet3, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::string expected_data;
|
| expected_data.append(packet1.begin(), packet1.end());
|
| @@ -279,18 +273,17 @@
|
| .Times(3)
|
| .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
|
|
|
| - talk_base::PacketOptions options;
|
| std::vector<char> packet1;
|
| CreateStunRequest(&packet1);
|
| - socket_host_->Send(dest_, packet1, options, 0);
|
| + socket_host_->Send(dest_, packet1, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::vector<char> packet2;
|
| CreateStunResponse(&packet2);
|
| - socket_host_->Send(dest_, packet2, options, 0);
|
| + socket_host_->Send(dest_, packet2, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::vector<char> packet3;
|
| CreateStunError(&packet3);
|
| - socket_host_->Send(dest_, packet3, options, 0);
|
| + socket_host_->Send(dest_, packet3, net::DSCP_NO_CHANGE, 0);
|
|
|
| std::string received_data;
|
| received_data.append(packet1.begin(), packet1.end());
|
| @@ -323,10 +316,9 @@
|
| MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID))))
|
| .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
|
|
|
| - talk_base::PacketOptions options;
|
| std::vector<char> packet;
|
| CreateRandomPacket(&packet);
|
| - socket_host_->Send(dest_, packet, options, 0);
|
| + socket_host_->Send(dest_, packet, net::DSCP_NO_CHANGE, 0);
|
|
|
| EXPECT_EQ(0U, sent_data_.size());
|
| }
|
| @@ -342,14 +334,13 @@
|
| .Times(2)
|
| .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
|
|
|
| - talk_base::PacketOptions options;
|
| std::vector<char> packet1;
|
| CreateStunRequest(&packet1);
|
| - socket_host_->Send(dest_, packet1, options, 0);
|
| + socket_host_->Send(dest_, packet1, net::DSCP_NO_CHANGE,0);
|
|
|
| std::vector<char> packet2;
|
| CreateStunResponse(&packet2);
|
| - socket_host_->Send(dest_, packet2, options, 0);
|
| + socket_host_->Send(dest_, packet2, net::DSCP_NO_CHANGE, 0);
|
|
|
| message_loop.RunUntilIdle();
|
|
|
|
|