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

Unified Diff: net/dns/dns_config_service_win_unittest.cc

Issue 10543168: [net/dns] Instrument DnsConfigService to measure performance and failures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/dns_config_service_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_config_service_win_unittest.cc
diff --git a/net/dns/dns_config_service_win_unittest.cc b/net/dns/dns_config_service_win_unittest.cc
index 63e4268d6ef7ba6cf4ef209bd0ee65aa74e5fb74..c3cce9bc4df1a96462d21482395ec8e912f26950 100644
--- a/net/dns/dns_config_service_win_unittest.cc
+++ b/net/dns/dns_config_service_win_unittest.cc
@@ -186,11 +186,14 @@ TEST(DnsConfigServiceWinTest, ConvertAdapterAddresses) {
}
DnsConfig config;
- bool result = internal::ConvertSettingsToDnsConfig(settings, &config);
- bool expected_result = !expected_nameservers.empty();
- ASSERT_EQ(expected_result, result);
+ internal::ConfigParseWinResult result =
+ internal::ConvertSettingsToDnsConfig(settings, &config);
+ internal::ConfigParseWinResult expected_result =
+ expected_nameservers.empty() ? internal::CONFIG_PARSE_WIN_NO_NAMESERVERS
+ : internal::CONFIG_PARSE_WIN_OK;
+ EXPECT_EQ(expected_result, result);
EXPECT_EQ(expected_nameservers, config.nameservers);
- if (result) {
+ if (result == internal::CONFIG_PARSE_WIN_OK) {
ASSERT_EQ(1u, config.search.size());
EXPECT_EQ(t.expected_suffix, config.search[0]);
}
@@ -375,8 +378,8 @@ TEST(DnsConfigServiceWinTest, ConvertSuffixSearch) {
for (size_t i = 0; i < arraysize(cases); ++i) {
const TestCase& t = cases[i];
DnsConfig config;
- ASSERT_TRUE(internal::ConvertSettingsToDnsConfig(t.input_settings,
- &config));
+ EXPECT_EQ(internal::CONFIG_PARSE_WIN_OK,
+ internal::ConvertSettingsToDnsConfig(t.input_settings, &config));
std::vector<std::string> expected_search;
for (size_t j = 0; !t.expected_search[j].empty(); ++j) {
expected_search.push_back(t.expected_search[j]);
@@ -414,7 +417,8 @@ TEST(DnsConfigServiceWinTest, AppendToMultiLabelName) {
t.input,
};
DnsConfig config;
- ASSERT_TRUE(internal::ConvertSettingsToDnsConfig(settings, &config));
+ EXPECT_EQ(internal::CONFIG_PARSE_WIN_OK,
+ internal::ConvertSettingsToDnsConfig(settings, &config));
EXPECT_EQ(config.append_to_multi_label_name, t.expected_output);
}
}
« no previous file with comments | « net/dns/dns_config_service_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698