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/proxy/mojo_proxy_resolver_impl.h" | 5 #include "net/proxy/mojo_proxy_resolver_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "base/memory/ptr_util.h" |
11 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
12 #include "mojo/public/cpp/bindings/binding.h" | 13 #include "mojo/public/cpp/bindings/binding.h" |
13 #include "net/base/net_errors.h" | 14 #include "net/base/net_errors.h" |
14 #include "net/proxy/mock_proxy_resolver.h" | 15 #include "net/proxy/mock_proxy_resolver.h" |
15 #include "net/proxy/proxy_info.h" | 16 #include "net/proxy/proxy_info.h" |
16 #include "net/proxy/proxy_resolver_v8_tracing.h" | 17 #include "net/proxy/proxy_resolver_v8_tracing.h" |
17 #include "net/proxy/proxy_server.h" | 18 #include "net/proxy/proxy_server.h" |
18 #include "net/test/event_waiter.h" | 19 #include "net/test/event_waiter.h" |
19 #include "net/test/gtest_util.h" | 20 #include "net/test/gtest_util.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 interfaces::ProxyResolverRequestClientPtr client_ptr; | 333 interfaces::ProxyResolverRequestClientPtr client_ptr; |
333 TestRequestClient client(mojo::MakeRequest(&client_ptr)); | 334 TestRequestClient client(mojo::MakeRequest(&client_ptr)); |
334 | 335 |
335 resolver_->GetProxyForUrl(GURL("http://example.com"), std::move(client_ptr)); | 336 resolver_->GetProxyForUrl(GURL("http://example.com"), std::move(client_ptr)); |
336 ASSERT_EQ(1u, mock_proxy_resolver_->pending_jobs().size()); | 337 ASSERT_EQ(1u, mock_proxy_resolver_->pending_jobs().size()); |
337 resolver_impl_.reset(); | 338 resolver_impl_.reset(); |
338 client.event_waiter().WaitForEvent(TestRequestClient::CONNECTION_ERROR); | 339 client.event_waiter().WaitForEvent(TestRequestClient::CONNECTION_ERROR); |
339 } | 340 } |
340 | 341 |
341 } // namespace net | 342 } // namespace net |
OLD | NEW |