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

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

Issue 1157843002: Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « mojo/tools/rev_sdk.py ('k') | third_party/mojo/mojom_bindings_generator_variables.gypi » ('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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 case GetProxyForUrlAction::COMPLETE: 241 case GetProxyForUrlAction::COMPLETE:
242 client->ReportResult(action.error, action.proxy_servers.Pass()); 242 client->ReportResult(action.error, action.proxy_servers.Pass());
243 break; 243 break;
244 case GetProxyForUrlAction::DROP: 244 case GetProxyForUrlAction::DROP:
245 client.reset(); 245 client.reset();
246 break; 246 break;
247 case GetProxyForUrlAction::DISCONNECT: 247 case GetProxyForUrlAction::DISCONNECT:
248 binding_.Close(); 248 binding_.Close();
249 break; 249 break;
250 case GetProxyForUrlAction::WAIT_FOR_CLIENT_DISCONNECT: 250 case GetProxyForUrlAction::WAIT_FOR_CLIENT_DISCONNECT:
251 ASSERT_FALSE(client.WaitForIncomingMethodCall()); 251 ASSERT_FALSE(client.WaitForIncomingResponse());
252 break; 252 break;
253 case GetProxyForUrlAction::SEND_LOAD_STATE_AND_BLOCK: 253 case GetProxyForUrlAction::SEND_LOAD_STATE_AND_BLOCK:
254 client->LoadStateChanged(LOAD_STATE_RESOLVING_HOST_IN_PROXY_SCRIPT); 254 client->LoadStateChanged(LOAD_STATE_RESOLVING_HOST_IN_PROXY_SCRIPT);
255 blocked_clients_.push_back( 255 blocked_clients_.push_back(
256 new interfaces::ProxyResolverRequestClientPtr(client.Pass())); 256 new interfaces::ProxyResolverRequestClientPtr(client.Pass()));
257 break; 257 break;
258 } 258 }
259 WakeWaiter(); 259 WakeWaiter();
260 } 260 }
261 261
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 break; 393 break;
394 case CreateProxyResolverAction::DROP_RESOLVER: 394 case CreateProxyResolverAction::DROP_RESOLVER:
395 // Save |client| so its pipe isn't closed. 395 // Save |client| so its pipe isn't closed.
396 blocked_clients_.push_back( 396 blocked_clients_.push_back(
397 new interfaces::ProxyResolverFactoryRequestClientPtr(client.Pass())); 397 new interfaces::ProxyResolverFactoryRequestClientPtr(client.Pass()));
398 break; 398 break;
399 case CreateProxyResolverAction::DROP_BOTH: 399 case CreateProxyResolverAction::DROP_BOTH:
400 // Both |request| and |client| will be closed. 400 // Both |request| and |client| will be closed.
401 break; 401 break;
402 case CreateProxyResolverAction::WAIT_FOR_CLIENT_DISCONNECT: 402 case CreateProxyResolverAction::WAIT_FOR_CLIENT_DISCONNECT:
403 ASSERT_FALSE(client.WaitForIncomingMethodCall()); 403 ASSERT_FALSE(client.WaitForIncomingResponse());
404 break; 404 break;
405 } 405 }
406 WakeWaiter(); 406 WakeWaiter();
407 } 407 }
408 408
409 } // namespace 409 } // namespace
410 410
411 class ProxyResolverMojoTest : public testing::Test, 411 class ProxyResolverMojoTest : public testing::Test,
412 public MojoProxyResolverFactory { 412 public MojoProxyResolverFactory {
413 public: 413 public:
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 &handle, net_log))); 738 &handle, net_log)));
739 on_delete_callback_.WaitForResult(); 739 on_delete_callback_.WaitForResult();
740 } 740 }
741 741
742 TEST_F(ProxyResolverMojoTest, DeleteResolver) { 742 TEST_F(ProxyResolverMojoTest, DeleteResolver) {
743 CreateProxyResolver(); 743 CreateProxyResolver();
744 proxy_resolver_mojo_.reset(); 744 proxy_resolver_mojo_.reset();
745 on_delete_callback_.WaitForResult(); 745 on_delete_callback_.WaitForResult();
746 } 746 }
747 } // namespace net 747 } // namespace net
OLDNEW
« no previous file with comments | « mojo/tools/rev_sdk.py ('k') | third_party/mojo/mojom_bindings_generator_variables.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698