OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/dns/dns_config_service.h" | 5 #include "net/dns/dns_config_service.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/cancelable_callback.h" | 9 #include "base/cancelable_callback.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/test/test_timeouts.h" | 12 #include "base/test/test_timeouts.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 class DnsConfigServiceTest : public testing::Test { | 19 class DnsConfigServiceTest : public testing::Test { |
20 public: | 20 public: |
21 void OnConfigChanged(const DnsConfig& config) { | 21 void OnConfigChanged(const DnsConfig& config) { |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 base::Unretained(this))); | 249 base::Unretained(this))); |
250 base::TimeDelta kTimeout = TestTimeouts::action_max_timeout(); | 250 base::TimeDelta kTimeout = TestTimeouts::action_max_timeout(); |
251 WaitForConfig(kTimeout); | 251 WaitForConfig(kTimeout); |
252 ASSERT_TRUE(last_config_.IsValid()) << "Did not receive DnsConfig in " << | 252 ASSERT_TRUE(last_config_.IsValid()) << "Did not receive DnsConfig in " << |
253 kTimeout.InSecondsF() << "s"; | 253 kTimeout.InSecondsF() << "s"; |
254 } | 254 } |
255 #endif // OS_POSIX || OS_WIN | 255 #endif // OS_POSIX || OS_WIN |
256 | 256 |
257 } // namespace net | 257 } // namespace net |
258 | 258 |
OLD | NEW |