OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/mojo_host_resolver_impl.h" | 5 #include "net/dns/mojo_host_resolver_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "mojo/public/cpp/bindings/binding.h" |
| 13 #include "mojo/public/cpp/bindings/interface_request.h" |
12 #include "net/base/address_list.h" | 14 #include "net/base/address_list.h" |
13 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
14 #include "net/base/net_util.h" | 16 #include "net/base/net_util.h" |
15 #include "net/dns/mock_host_resolver.h" | 17 #include "net/dns/mock_host_resolver.h" |
16 #include "net/dns/mojo_host_type_converters.h" | 18 #include "net/dns/mojo_host_type_converters.h" |
17 #include "net/log/net_log.h" | 19 #include "net/log/net_log.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" | |
20 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" | |
21 | 21 |
22 namespace net { | 22 namespace net { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 class TestRequestClient : public interfaces::HostResolverRequestClient { | 26 class TestRequestClient : public interfaces::HostResolverRequestClient { |
27 public: | 27 public: |
28 explicit TestRequestClient( | 28 explicit TestRequestClient( |
29 mojo::InterfaceRequest<interfaces::HostResolverRequestClient> req) | 29 mojo::InterfaceRequest<interfaces::HostResolverRequestClient> req) |
30 : done_(false), binding_(this, req.Pass()) { | 30 : done_(false), binding_(this, req.Pass()) { |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 WaitForRequests(1); | 278 WaitForRequests(1); |
279 | 279 |
280 client.reset(); | 280 client.reset(); |
281 base::RunLoop().RunUntilIdle(); | 281 base::RunLoop().RunUntilIdle(); |
282 | 282 |
283 mock_host_resolver_.ResolveAllPending(); | 283 mock_host_resolver_.ResolveAllPending(); |
284 base::RunLoop().RunUntilIdle(); | 284 base::RunLoop().RunUntilIdle(); |
285 } | 285 } |
286 | 286 |
287 } // namespace net | 287 } // namespace net |
OLD | NEW |