OLD | NEW |
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_socket.h" | 5 #include "net/udp/udp_socket.h" |
6 | 6 |
7 #include "net/udp/udp_client_socket.h" | 7 #include "net/udp/udp_client_socket.h" |
8 #include "net/udp/udp_server_socket.h" | 8 #include "net/udp/udp_server_socket.h" |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 // Some Android devices do not support multicast socket. | 534 // Some Android devices do not support multicast socket. |
535 // The ones supporting multicast need WifiManager.MulitcastLock to enable it. | 535 // The ones supporting multicast need WifiManager.MulitcastLock to enable it. |
536 // http://goo.gl/jjAk9 | 536 // http://goo.gl/jjAk9 |
537 #define MAYBE_JoinMulticastGroup DISABLED_JoinMulticastGroup | 537 #define MAYBE_JoinMulticastGroup DISABLED_JoinMulticastGroup |
538 #else | 538 #else |
539 #define MAYBE_JoinMulticastGroup JoinMulticastGroup | 539 #define MAYBE_JoinMulticastGroup JoinMulticastGroup |
540 #endif // defined(OS_ANDROID) | 540 #endif // defined(OS_ANDROID) |
541 | 541 |
542 TEST_F(UDPSocketTest, MAYBE_JoinMulticastGroup) { | 542 TEST_F(UDPSocketTest, MAYBE_JoinMulticastGroup) { |
543 const uint16 kPort = 9999; | 543 const uint16 kPort = 9999; |
544 const char* const kGroup = "237.132.100.17"; | 544 const char kGroup[] = "237.132.100.17"; |
545 | 545 |
546 IPEndPoint bind_address; | 546 IPEndPoint bind_address; |
547 CreateUDPAddress("0.0.0.0", kPort, &bind_address); | 547 CreateUDPAddress("0.0.0.0", kPort, &bind_address); |
548 IPAddressNumber group_ip; | 548 IPAddressNumber group_ip; |
549 EXPECT_TRUE(ParseIPLiteralToNumber(kGroup, &group_ip)); | 549 EXPECT_TRUE(ParseIPLiteralToNumber(kGroup, &group_ip)); |
550 | 550 |
551 UDPSocket socket(DatagramSocket::DEFAULT_BIND, | 551 UDPSocket socket(DatagramSocket::DEFAULT_BIND, |
552 RandIntCallback(), | 552 RandIntCallback(), |
553 NULL, | 553 NULL, |
554 NetLog::Source()); | 554 NetLog::Source()); |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 g_expected_traffic_type = QOSTrafficTypeExcellentEffort; | 743 g_expected_traffic_type = QOSTrafficTypeExcellentEffort; |
744 EXPECT_EQ(OK, client.SetDiffServCodePoint(DSCP_NO_CHANGE)); | 744 EXPECT_EQ(OK, client.SetDiffServCodePoint(DSCP_NO_CHANGE)); |
745 g_expected_dscp = DSCP_DEFAULT; | 745 g_expected_dscp = DSCP_DEFAULT; |
746 g_expected_traffic_type = QOSTrafficTypeBestEffort; | 746 g_expected_traffic_type = QOSTrafficTypeBestEffort; |
747 EXPECT_EQ(OK, client.SetDiffServCodePoint(DSCP_DEFAULT)); | 747 EXPECT_EQ(OK, client.SetDiffServCodePoint(DSCP_DEFAULT)); |
748 client.Close(); | 748 client.Close(); |
749 } | 749 } |
750 #endif | 750 #endif |
751 | 751 |
752 } // namespace net | 752 } // namespace net |
OLD | NEW |