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

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

Issue 22381012: Allow p2p UDP packages to set DSCP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: extra newline removed Created 7 years, 4 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 9ecd56abd5403501941187603bd2a6e410cac9ca..0db5655f0f18dd0063df95457e1073d7c4d77ce2 100644
--- a/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
+++ b/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
@@ -138,6 +138,11 @@ class FakeDatagramServerSocket : public net::DatagramServerSocket {
return net::ERR_NOT_IMPLEMENTED;
}
+ virtual int SetToS(net::DiffServCodePoint dscp) OVERRIDE {
+ NOTIMPLEMENTED();
+ return net::ERR_NOT_IMPLEMENTED;
+ }
+
private:
net::IPEndPoint address_;
std::deque<UDPPacket>* sent_packets_;
@@ -193,15 +198,15 @@ TEST_F(P2PSocketHostUdpTest, SendStunNoAuth) {
std::vector<char> packet1;
CreateStunRequest(&packet1);
- socket_host_->Send(dest1_, packet1);
+ socket_host_->Send(dest1_, packet1, net::DSCP_NO_CHANGE);
std::vector<char> packet2;
CreateStunResponse(&packet2);
- socket_host_->Send(dest1_, packet2);
+ socket_host_->Send(dest1_, packet2, net::DSCP_NO_CHANGE);
std::vector<char> packet3;
CreateStunError(&packet3);
- socket_host_->Send(dest1_, packet3);
+ socket_host_->Send(dest1_, packet3, net::DSCP_NO_CHANGE);
ASSERT_EQ(sent_packets_.size(), 3U);
ASSERT_EQ(sent_packets_[0].second, packet1);
@@ -218,7 +223,7 @@ TEST_F(P2PSocketHostUdpTest, SendDataNoAuth) {
std::vector<char> packet;
CreateRandomPacket(&packet);
- socket_host_->Send(dest1_, packet);
+ socket_host_->Send(dest1_, packet, net::DSCP_NO_CHANGE);
ASSERT_EQ(sent_packets_.size(), 0U);
}
@@ -240,7 +245,7 @@ TEST_F(P2PSocketHostUdpTest, SendAfterStunRequest) {
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
std::vector<char> packet;
CreateRandomPacket(&packet);
- socket_host_->Send(dest1_, packet);
+ socket_host_->Send(dest1_, packet, net::DSCP_NO_CHANGE);
ASSERT_EQ(1U, sent_packets_.size());
ASSERT_EQ(dest1_, sent_packets_[0].first);
@@ -263,7 +268,7 @@ TEST_F(P2PSocketHostUdpTest, SendAfterStunResponse) {
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
std::vector<char> packet;
CreateRandomPacket(&packet);
- socket_host_->Send(dest1_, packet);
+ socket_host_->Send(dest1_, packet, net::DSCP_NO_CHANGE);
ASSERT_EQ(1U, sent_packets_.size());
ASSERT_EQ(dest1_, sent_packets_[0].first);
@@ -286,7 +291,7 @@ TEST_F(P2PSocketHostUdpTest, SendAfterStunResponseDifferentHost) {
EXPECT_CALL(sender_, Send(
MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID))))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
- socket_host_->Send(dest2_, packet);
+ socket_host_->Send(dest2_, packet, net::DSCP_NO_CHANGE);
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698