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

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

Issue 910343003: Create an in-process v8 proxy resolver using Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8-pac-complete-patch
Patch Set: Remove extra space. Created 5 years, 9 months 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
« no previous file with comments | « net/proxy/mojo_proxy_resolver_factory.h ('k') | net/proxy/proxy_service_mojo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/proxy_resolver_mojo.h" 5 #include "net/proxy/proxy_resolver_mojo.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 blocked_clients_.push_back( 248 blocked_clients_.push_back(
249 new interfaces::ProxyResolverRequestClientPtr(client.Pass())); 249 new interfaces::ProxyResolverRequestClientPtr(client.Pass()));
250 break; 250 break;
251 } 251 }
252 WakeWaiter(); 252 WakeWaiter();
253 } 253 }
254 254
255 class TestMojoProxyResolverFactory : public MojoProxyResolverFactory { 255 class TestMojoProxyResolverFactory : public MojoProxyResolverFactory {
256 public: 256 public:
257 TestMojoProxyResolverFactory(); 257 TestMojoProxyResolverFactory();
258 ~TestMojoProxyResolverFactory(); 258 ~TestMojoProxyResolverFactory() override;
259 259
260 // Overridden from MojoProxyResolverFactory: 260 // Overridden from MojoProxyResolverFactory:
261 void Create(mojo::InterfaceRequest<interfaces::ProxyResolver> req, 261 void Create(mojo::InterfaceRequest<interfaces::ProxyResolver> req,
262 interfaces::HostResolverPtr host_resolver) override; 262 interfaces::HostResolverPtr host_resolver) override;
263 263
264 MockMojoProxyResolver& GetMockResolver() { return *mock_proxy_resolver_; } 264 MockMojoProxyResolver& GetMockResolver() { return *mock_proxy_resolver_; }
265 265
266 void AddFuturePacScriptAction(int creation, SetPacScriptAction action); 266 void AddFuturePacScriptAction(int creation, SetPacScriptAction action);
267 void AddFutureGetProxyAction(int creation, GetProxyForUrlAction action); 267 void AddFutureGetProxyAction(int creation, GetProxyForUrlAction action);
268 268
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 // resolve request. 726 // resolve request.
727 scoped_ptr<Request> request(MakeRequest(GURL(kExampleUrl))); 727 scoped_ptr<Request> request(MakeRequest(GURL(kExampleUrl)));
728 EXPECT_EQ(ERR_IO_PENDING, request->Resolve()); 728 EXPECT_EQ(ERR_IO_PENDING, request->Resolve());
729 EXPECT_EQ(OK, request->WaitForResult()); 729 EXPECT_EQ(OK, request->WaitForResult());
730 EXPECT_EQ("DIRECT", request->results().ToPacString()); 730 EXPECT_EQ("DIRECT", request->results().ToPacString());
731 731
732 EXPECT_EQ(2, mojo_proxy_resolver_factory_.num_create_calls()); 732 EXPECT_EQ(2, mojo_proxy_resolver_factory_.num_create_calls());
733 } 733 }
734 734
735 } // namespace net 735 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/mojo_proxy_resolver_factory.h ('k') | net/proxy/proxy_service_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698