OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |