OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_js_bindings.h" | 5 #include "net/proxy/proxy_resolver_js_bindings.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 }; | 66 }; |
67 | 67 |
68 class MockSyncHostResolver : public SyncHostResolver { | 68 class MockSyncHostResolver : public SyncHostResolver { |
69 public: | 69 public: |
70 MockSyncHostResolver() { | 70 MockSyncHostResolver() { |
71 resolver_.set_synchronous_mode(true); | 71 resolver_.set_synchronous_mode(true); |
72 } | 72 } |
73 | 73 |
74 virtual int Resolve(const HostResolver::RequestInfo& info, | 74 virtual int Resolve(const HostResolver::RequestInfo& info, |
75 AddressList* addresses) OVERRIDE { | 75 AddressList* addresses) OVERRIDE { |
76 return resolver_.Resolve(info, addresses, NULL, NULL, BoundNetLog()); | 76 return resolver_.Resolve(info, addresses, CompletionCallback(), NULL, |
| 77 BoundNetLog()); |
77 } | 78 } |
78 | 79 |
79 virtual void Shutdown() OVERRIDE {} | 80 virtual void Shutdown() OVERRIDE {} |
80 | 81 |
81 RuleBasedHostResolverProc* rules() { | 82 RuleBasedHostResolverProc* rules() { |
82 return resolver_.rules(); | 83 return resolver_.rules(); |
83 } | 84 } |
84 | 85 |
85 private: | 86 private: |
86 MockHostResolver resolver_; | 87 MockHostResolver resolver_; |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 global_log.GetEntries(&global_log_entries); | 353 global_log.GetEntries(&global_log_entries); |
353 EXPECT_EQ(2u, global_log_entries.size()); | 354 EXPECT_EQ(2u, global_log_entries.size()); |
354 EXPECT_TRUE(LogContainsEvent( | 355 EXPECT_TRUE(LogContainsEvent( |
355 global_log_entries, 1, NetLog::TYPE_PAC_JAVASCRIPT_ALERT, | 356 global_log_entries, 1, NetLog::TYPE_PAC_JAVASCRIPT_ALERT, |
356 NetLog::PHASE_NONE)); | 357 NetLog::PHASE_NONE)); |
357 } | 358 } |
358 | 359 |
359 } // namespace | 360 } // namespace |
360 | 361 |
361 } // namespace net | 362 } // namespace net |
OLD | NEW |