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

Unified Diff: net/dns/dns_config_service_unittest.cc

Issue 10377092: [net/dns] Isolate DnsConfigWatcher from DnsConfigService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Braces. Created 8 years, 7 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/dns/dns_config_service_unittest.cc
diff --git a/net/dns/dns_config_service_unittest.cc b/net/dns/dns_config_service_unittest.cc
index 9d27cb7283f4fbd72e5a3690f9cf0d17a614caea..e68db27e00e4d46e3ff86b8732162bbf77e1935f 100644
--- a/net/dns/dns_config_service_unittest.cc
+++ b/net/dns/dns_config_service_unittest.cc
@@ -29,9 +29,7 @@ class DnsConfigServiceTest : public testing::Test {
protected:
class TestDnsConfigService : public DnsConfigService {
public:
- virtual void Watch(const CallbackType& callback) OVERRIDE {
- set_callback(callback);
- }
+ virtual void OnDNSChanged(unsigned detail) OVERRIDE {}
// Expose the protected methods to this test suite.
void InvalidateConfig() {
@@ -189,16 +187,12 @@ TEST_F(DnsConfigServiceTest, FLAKY_GetSystemConfig) {
service_.reset();
scoped_ptr<DnsConfigService> service(DnsConfigService::CreateSystemService());
- service->Watch(base::Bind(&DnsConfigServiceTest::OnConfigChanged,
- base::Unretained(this)));
+ service->Read(base::Bind(&DnsConfigServiceTest::OnConfigChanged,
+ base::Unretained(this)));
base::TimeDelta kTimeout = TestTimeouts::action_max_timeout();
WaitForConfig(kTimeout);
ASSERT_TRUE(last_config_.IsValid()) << "Did not receive DnsConfig in " <<
kTimeout.InSecondsF() << "s";
-
- // Restart watch to confirm it's allowed.
- service->Watch(base::Bind(&DnsConfigServiceTest::OnConfigChanged,
- base::Unretained(this)));
}
#endif // OS_POSIX || OS_WIN

Powered by Google App Engine
This is Rietveld 408576698