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

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

Issue 9121055: Add a source to V8 proxy resolver-initiated DNS requests, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Update year Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « net/proxy/sync_host_resolver_bridge.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/sync_host_resolver_bridge.h" 5 #include "net/proxy/sync_host_resolver_bridge.h"
6 6
7 #include "base/threading/thread.h" 7 #include "base/threading/thread.h"
8 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "net/base/address_list.h" 9 #include "net/base/address_list.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
11 #include "net/base/net_log.h" 11 #include "net/base/net_log.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 ProxyInfo* results, 85 ProxyInfo* results,
86 const CompletionCallback& callback, 86 const CompletionCallback& callback,
87 RequestHandle* request, 87 RequestHandle* request,
88 const BoundNetLog& net_log) { 88 const BoundNetLog& net_log) {
89 EXPECT_FALSE(!callback.is_null()); 89 EXPECT_FALSE(!callback.is_null());
90 EXPECT_FALSE(request); 90 EXPECT_FALSE(request);
91 91
92 // Do a synchronous host resolve. 92 // Do a synchronous host resolve.
93 HostResolver::RequestInfo info(HostPortPair::FromURL(url)); 93 HostResolver::RequestInfo info(HostPortPair::FromURL(url));
94 AddressList addresses; 94 AddressList addresses;
95 int rv = host_resolver_->Resolve(info, &addresses); 95 int rv = host_resolver_->Resolve(info, &addresses, net_log);
96 96
97 EXPECT_EQ(ERR_ABORTED, rv); 97 EXPECT_EQ(ERR_ABORTED, rv);
98 98
99 return rv; 99 return rv;
100 } 100 }
101 101
102 virtual void CancelRequest(RequestHandle request) OVERRIDE { 102 virtual void CancelRequest(RequestHandle request) OVERRIDE {
103 NOTREACHED(); 103 NOTREACHED();
104 } 104 }
105 105
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 // stop the IOThread, which will in turn delete the 235 // stop the IOThread, which will in turn delete the
236 // SingleThreadedProxyResolver, which in turn will stop its internal 236 // SingleThreadedProxyResolver, which in turn will stop its internal
237 // PAC thread (which is currently blocked waiting on the host resolve which 237 // PAC thread (which is currently blocked waiting on the host resolve which
238 // is running on IOThread). The IOThread::Cleanup() will verify that after 238 // is running on IOThread). The IOThread::Cleanup() will verify that after
239 // the PAC thread is stopped, it cancels the request on the HostResolver. 239 // the PAC thread is stopped, it cancels the request on the HostResolver.
240 } 240 }
241 241
242 } // namespace 242 } // namespace
243 243
244 } // namespace net 244 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/sync_host_resolver_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698