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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/cancelable_callback.h" | 10 #include "base/cancelable_callback.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
15 #include "base/test/test_timeouts.h" | 15 #include "base/test/test_timeouts.h" |
16 #include "base/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
17 #include "net/dns/dns_protocol.h" | 17 #include "net/dns/dns_protocol.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 namespace net { | 20 namespace net { |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 class DnsConfigServiceTest : public testing::Test { | 24 class DnsConfigServiceTest : public testing::Test { |
25 public: | 25 public: |
26 void OnConfigChanged(const DnsConfig& config) { | 26 void OnConfigChanged(const DnsConfig& config) { |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 last_config_ = bad_config; | 238 last_config_ = bad_config; |
239 // No change, so no update. | 239 // No change, so no update. |
240 service_->InvalidateConfig(); | 240 service_->InvalidateConfig(); |
241 service_->OnConfigRead(config2); | 241 service_->OnConfigRead(config2); |
242 EXPECT_TRUE(last_config_.Equals(bad_config)); | 242 EXPECT_TRUE(last_config_.Equals(bad_config)); |
243 } | 243 } |
244 | 244 |
245 } // namespace net | 245 } // namespace net |
246 | 246 |
OLD | NEW |