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

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

Issue 2165463006: Disable NetworkTest.DefaultLocalAddress for Android. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add a comment that explains why the test was disabled. Created 4 years, 5 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 | « no previous file | 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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 network_monitor->OnNetworksChanged(); 1072 network_monitor->OnNetworksChanged();
1073 EXPECT_TRUE_WAIT(callback_called_, 1000); 1073 EXPECT_TRUE_WAIT(callback_called_, 1000);
1074 1074
1075 // Network manager is stopped. 1075 // Network manager is stopped.
1076 manager.StopUpdating(); 1076 manager.StopUpdating();
1077 EXPECT_FALSE(GetNetworkMonitor(manager)->started()); 1077 EXPECT_FALSE(GetNetworkMonitor(manager)->started());
1078 1078
1079 NetworkMonitorFactory::ReleaseFactory(factory); 1079 NetworkMonitorFactory::ReleaseFactory(factory);
1080 } 1080 }
1081 1081
1082 TEST_F(NetworkTest, DefaultLocalAddress) { 1082 // Fails on Android: https://bugs.chromium.org/p/webrtc/issues/detail?id=4364.
1083 #if defined(WEBRTC_ANDROID)
1084 #define MAYBE_DefaultLocalAddress DISABLED_DefaultLocalAddress
1085 #else
1086 #define MAYBE_DefaultLocalAddress DefaultLocalAddress
1087 #endif
1088 TEST_F(NetworkTest, MAYBE_DefaultLocalAddress) {
1083 IPAddress ip; 1089 IPAddress ip;
1084 TestBasicNetworkManager manager; 1090 TestBasicNetworkManager manager;
1085 manager.SignalNetworksChanged.connect(static_cast<NetworkTest*>(this), 1091 manager.SignalNetworksChanged.connect(static_cast<NetworkTest*>(this),
1086 &NetworkTest::OnNetworksChanged); 1092 &NetworkTest::OnNetworksChanged);
1087 FakeNetworkMonitorFactory* factory = new FakeNetworkMonitorFactory(); 1093 FakeNetworkMonitorFactory* factory = new FakeNetworkMonitorFactory();
1088 NetworkMonitorFactory::SetFactory(factory); 1094 NetworkMonitorFactory::SetFactory(factory);
1089 manager.StartUpdating(); 1095 manager.StartUpdating();
1090 EXPECT_TRUE_WAIT(callback_called_, 1000); 1096 EXPECT_TRUE_WAIT(callback_called_, 1000);
1091 1097
1092 // Make sure we can query default local address when an address for such 1098 // Make sure we can query default local address when an address for such
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 // If the set default address is in a network, GetDefaultLocalAddress will 1144 // If the set default address is in a network, GetDefaultLocalAddress will
1139 // return the best IP in that network. 1145 // return the best IP in that network.
1140 manager.set_default_local_addresses(GetLoopbackIP(AF_INET), ip2); 1146 manager.set_default_local_addresses(GetLoopbackIP(AF_INET), ip2);
1141 EXPECT_TRUE(manager.GetDefaultLocalAddress(AF_INET6, &ip)); 1147 EXPECT_TRUE(manager.GetDefaultLocalAddress(AF_INET6, &ip));
1142 EXPECT_EQ(static_cast<IPAddress>(ip1), ip); 1148 EXPECT_EQ(static_cast<IPAddress>(ip1), ip);
1143 1149
1144 manager.StopUpdating(); 1150 manager.StopUpdating();
1145 } 1151 }
1146 1152
1147 } // namespace rtc 1153 } // namespace rtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698