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

Unified Diff: net/base/net_util_unittest.cc

Issue 23726043: Added NetworkInterface::network_prefix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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: net/base/net_util_unittest.cc
diff --git a/net/base/net_util_unittest.cc b/net/base/net_util_unittest.cc
index 207e05a1cc077909f78c1a703d434d3b1f23bff9..d875201c961db614b869a7a22fb0c015914895ec 100644
--- a/net/base/net_util_unittest.cc
+++ b/net/base/net_util_unittest.cc
@@ -3309,6 +3309,12 @@ TEST(NetUtilTest, GetNetworkList) {
}
}
EXPECT_FALSE(all_zeroes);
+
+#if !defined(OS_ANDROID)
+ EXPECT_GE(it->network_prefix, 1u);
+ EXPECT_TRUE(it->address.size() != kIPv4AddressSize ||
+ it->network_prefix <= 32u);
szym 2013/09/20 19:30:15 Point-to-point addresses have no netmask. Will the
+#endif // OS_ANDROID
}
}
« net/base/net_util.h ('K') | « net/base/net_util_posix.cc ('k') | net/base/net_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698