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

Side by Side Diff: webrtc/base/network_unittest.cc

Issue 2006893003: Set IOS Wifi interface type based on the interface name. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add TODO Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « webrtc/base/network.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 860
861 #if defined(WEBRTC_IOS) 861 #if defined(WEBRTC_IOS)
862 char if_name[20] = "pdp_ip0"; 862 char if_name[20] = "pdp_ip0";
863 ifaddrs* addr_list = 863 ifaddrs* addr_list =
864 InstallIpv6Network(if_name, ipv6_address1, ipv6_mask, manager); 864 InstallIpv6Network(if_name, ipv6_address1, ipv6_mask, manager);
865 865
866 EXPECT_EQ(ADAPTER_TYPE_CELLULAR, GetAdapterType(manager)); 866 EXPECT_EQ(ADAPTER_TYPE_CELLULAR, GetAdapterType(manager));
867 ClearNetworks(manager); 867 ClearNetworks(manager);
868 ReleaseIfAddrs(addr_list); 868 ReleaseIfAddrs(addr_list);
869 869
870 strcpy(if_name, "en0");
871 addr_list = InstallIpv6Network(if_name, ipv6_address1, ipv6_mask, manager);
872 EXPECT_EQ(ADAPTER_TYPE_WIFI, GetAdapterType(manager));
873 ClearNetworks(manager);
874 ReleaseIfAddrs(addr_list);
875
870 #elif defined(WEBRTC_ANDROID) 876 #elif defined(WEBRTC_ANDROID)
871 char if_name[20] = "rmnet0"; 877 char if_name[20] = "rmnet0";
872 ifaddrs* addr_list = 878 ifaddrs* addr_list =
873 InstallIpv6Network(if_name, ipv6_address1, ipv6_mask, manager); 879 InstallIpv6Network(if_name, ipv6_address1, ipv6_mask, manager);
874 880
875 EXPECT_EQ(ADAPTER_TYPE_CELLULAR, GetAdapterType(manager)); 881 EXPECT_EQ(ADAPTER_TYPE_CELLULAR, GetAdapterType(manager));
876 ClearNetworks(manager); 882 ClearNetworks(manager);
877 ReleaseIfAddrs(addr_list); 883 ReleaseIfAddrs(addr_list);
878 884
879 strcpy(if_name, "wlan1"); 885 strcpy(if_name, "wlan1");
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 // If the set default address is in a network, GetDefaultLocalAddress will 1155 // If the set default address is in a network, GetDefaultLocalAddress will
1150 // return the best IP in that network. 1156 // return the best IP in that network.
1151 manager.set_default_local_addresses(GetLoopbackIP(AF_INET), ip2); 1157 manager.set_default_local_addresses(GetLoopbackIP(AF_INET), ip2);
1152 EXPECT_TRUE(manager.GetDefaultLocalAddress(AF_INET6, &ip)); 1158 EXPECT_TRUE(manager.GetDefaultLocalAddress(AF_INET6, &ip));
1153 EXPECT_EQ(static_cast<IPAddress>(ip1), ip); 1159 EXPECT_EQ(static_cast<IPAddress>(ip1), ip);
1154 1160
1155 manager.StopUpdating(); 1161 manager.StopUpdating();
1156 } 1162 }
1157 1163
1158 } // namespace rtc 1164 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/network.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698