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

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

Issue 1746012: More cleanup of net_log.h (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « net/proxy/single_threaded_proxy_resolver.cc ('k') | net/socket/client_socket_pool_base.cc » ('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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/waitable_event.h" 5 #include "base/waitable_event.h"
6 #include "googleurl/src/gurl.h" 6 #include "googleurl/src/gurl.h"
7 #include "net/base/net_log.h" 7 #include "net/base/net_log.h"
8 #include "net/base/net_log_unittest.h" 8 #include "net/base/net_log_unittest.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 24 matching lines...) Expand all
35 const BoundNetLog& net_log) { 35 const BoundNetLog& net_log) {
36 if (resolve_latency_ms_) 36 if (resolve_latency_ms_)
37 PlatformThread::Sleep(resolve_latency_ms_); 37 PlatformThread::Sleep(resolve_latency_ms_);
38 38
39 CheckIsOnWorkerThread(); 39 CheckIsOnWorkerThread();
40 40
41 EXPECT_TRUE(callback == NULL); 41 EXPECT_TRUE(callback == NULL);
42 EXPECT_TRUE(request == NULL); 42 EXPECT_TRUE(request == NULL);
43 43
44 // Write something into |net_log| (doesn't really have any meaning.) 44 // Write something into |net_log| (doesn't really have any meaning.)
45 net_log.BeginEvent(NetLog::TYPE_PROXY_RESOLVER_V8_DNS_RESOLVE); 45 net_log.BeginEvent(NetLog::TYPE_PROXY_RESOLVER_V8_DNS_RESOLVE, NULL);
46 46
47 results->UseNamedProxy(query_url.host()); 47 results->UseNamedProxy(query_url.host());
48 48
49 // Return a success code which represents the request's order. 49 // Return a success code which represents the request's order.
50 return request_count_++; 50 return request_count_++;
51 } 51 }
52 52
53 virtual void CancelRequest(RequestHandle request) { 53 virtual void CancelRequest(RequestHandle request) {
54 NOTREACHED(); 54 NOTREACHED();
55 } 55 }
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 rv = callback1.WaitForResult(); 464 rv = callback1.WaitForResult();
465 EXPECT_EQ(1, rv); 465 EXPECT_EQ(1, rv);
466 EXPECT_EQ("PROXY request1:80", results1.ToPacString()); 466 EXPECT_EQ("PROXY request1:80", results1.ToPacString());
467 467
468 // The SetPacScript callback should never have been completed. 468 // The SetPacScript callback should never have been completed.
469 EXPECT_FALSE(set_pac_script_callback.have_result()); 469 EXPECT_FALSE(set_pac_script_callback.have_result());
470 } 470 }
471 471
472 } // namespace 472 } // namespace
473 } // namespace net 473 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/single_threaded_proxy_resolver.cc ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698