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

Side by Side Diff: net/udp/udp_socket_unittest.cc

Issue 99923004: Add support of IP_MULTICAST_IF in UDP sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/udp/udp_socket_libevent.cc ('k') | net/udp/udp_socket_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/udp/udp_client_socket.h" 5 #include "net/udp/udp_client_socket.h"
6 #include "net/udp/udp_server_socket.h" 6 #include "net/udp/udp_server_socket.h"
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 UDPSocket socket(DatagramSocket::DEFAULT_BIND, 567 UDPSocket socket(DatagramSocket::DEFAULT_BIND,
568 RandIntCallback(), 568 RandIntCallback(),
569 NULL, 569 NULL,
570 NetLog::Source()); 570 NetLog::Source());
571 // Before binding. 571 // Before binding.
572 EXPECT_EQ(OK, socket.SetMulticastLoopbackMode(false)); 572 EXPECT_EQ(OK, socket.SetMulticastLoopbackMode(false));
573 EXPECT_EQ(OK, socket.SetMulticastLoopbackMode(true)); 573 EXPECT_EQ(OK, socket.SetMulticastLoopbackMode(true));
574 EXPECT_EQ(OK, socket.SetMulticastTimeToLive(0)); 574 EXPECT_EQ(OK, socket.SetMulticastTimeToLive(0));
575 EXPECT_EQ(OK, socket.SetMulticastTimeToLive(3)); 575 EXPECT_EQ(OK, socket.SetMulticastTimeToLive(3));
576 EXPECT_NE(OK, socket.SetMulticastTimeToLive(-1)); 576 EXPECT_NE(OK, socket.SetMulticastTimeToLive(-1));
577 EXPECT_EQ(OK, socket.SetMulticastInterface(0));
577 578
578 EXPECT_EQ(OK, socket.Bind(bind_address)); 579 EXPECT_EQ(OK, socket.Bind(bind_address));
579 580
581 EXPECT_NE(OK, socket.SetMulticastLoopbackMode(false));
582 EXPECT_NE(OK, socket.SetMulticastTimeToLive(0));
583 EXPECT_NE(OK, socket.SetMulticastInterface(0));
584
580 socket.Close(); 585 socket.Close();
581 } 586 }
582 587
583 } // namespace 588 } // namespace
584 589
585 } // namespace net 590 } // namespace net
OLDNEW
« no previous file with comments | « net/udp/udp_socket_libevent.cc ('k') | net/udp/udp_socket_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698