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

Side by Side Diff: net/proxy/mojo_proxy_resolver_impl_unittest.cc

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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 <vector> 8 #include <vector>
9 9
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
11 #include "mojo/public/cpp/bindings/binding.h"
11 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
12 #include "net/proxy/mock_proxy_resolver.h" 13 #include "net/proxy/mock_proxy_resolver.h"
13 #include "net/proxy/mojo_proxy_type_converters.h" 14 #include "net/proxy/mojo_proxy_type_converters.h"
14 #include "net/proxy/proxy_info.h" 15 #include "net/proxy/proxy_info.h"
15 #include "net/proxy/proxy_resolver_v8_tracing.h" 16 #include "net/proxy/proxy_resolver_v8_tracing.h"
16 #include "net/proxy/proxy_server.h" 17 #include "net/proxy/proxy_server.h"
17 #include "net/test/event_waiter.h" 18 #include "net/test/event_waiter.h"
18 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
19 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
20 20
21 namespace net { 21 namespace net {
22 namespace { 22 namespace {
23 23
24 class TestRequestClient : public interfaces::ProxyResolverRequestClient { 24 class TestRequestClient : public interfaces::ProxyResolverRequestClient {
25 public: 25 public:
26 enum Event { 26 enum Event {
27 RESULT_RECEIVED, 27 RESULT_RECEIVED,
28 CONNECTION_ERROR, 28 CONNECTION_ERROR,
29 }; 29 };
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 interfaces::ProxyResolverRequestClientPtr client_ptr; 312 interfaces::ProxyResolverRequestClientPtr client_ptr;
313 TestRequestClient client(mojo::GetProxy(&client_ptr)); 313 TestRequestClient client(mojo::GetProxy(&client_ptr));
314 314
315 resolver_->GetProxyForUrl("http://example.com", client_ptr.Pass()); 315 resolver_->GetProxyForUrl("http://example.com", client_ptr.Pass());
316 ASSERT_EQ(1u, mock_proxy_resolver_->pending_requests().size()); 316 ASSERT_EQ(1u, mock_proxy_resolver_->pending_requests().size());
317 resolver_impl_.reset(); 317 resolver_impl_.reset();
318 client.event_waiter().WaitForEvent(TestRequestClient::CONNECTION_ERROR); 318 client.event_waiter().WaitForEvent(TestRequestClient::CONNECTION_ERROR);
319 } 319 }
320 320
321 } // namespace net 321 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc ('k') | net/proxy/mojo_proxy_type_converters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698