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

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

Issue 368001: Second patch in making destructors of refcounted objects private. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <ws2tcpip.h> 8 #include <ws2tcpip.h>
9 #else 9 #else
10 #include <netdb.h> 10 #include <netdb.h>
(...skipping 30 matching lines...) Expand all
41 *addresses = temp_list; 41 *addresses = temp_list;
42 return OK; 42 return OK;
43 } 43 }
44 virtual void CancelRequest(RequestHandle req) {} 44 virtual void CancelRequest(RequestHandle req) {}
45 virtual void AddObserver(Observer* observer) {} 45 virtual void AddObserver(Observer* observer) {}
46 virtual void RemoveObserver(Observer* observer) {} 46 virtual void RemoveObserver(Observer* observer) {}
47 virtual HostCache* GetHostCache() { return NULL; } 47 virtual HostCache* GetHostCache() { return NULL; }
48 virtual void Shutdown() {} 48 virtual void Shutdown() {}
49 49
50 private: 50 private:
51 ~MockHostResolverWithMultipleResults() {}
52
51 // Resolves an IP literal to an address list. 53 // Resolves an IP literal to an address list.
52 AddressList ResolveIPLiteral(const char* ip_literal) { 54 AddressList ResolveIPLiteral(const char* ip_literal) {
53 AddressList result; 55 AddressList result;
54 int rv = SystemHostResolverProc(ip_literal, 56 int rv = SystemHostResolverProc(ip_literal,
55 ADDRESS_FAMILY_UNSPECIFIED, 57 ADDRESS_FAMILY_UNSPECIFIED,
56 &result); 58 &result);
57 EXPECT_EQ(OK, rv); 59 EXPECT_EQ(OK, rv);
58 EXPECT_EQ(NULL, result.head()->ai_next); 60 EXPECT_EQ(NULL, result.head()->ai_next);
59 return result; 61 return result;
60 } 62 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 187
186 EXPECT_EQ("192.168.1.1;172.22.34.1;200.100.1.2", 188 EXPECT_EQ("192.168.1.1;172.22.34.1;200.100.1.2",
187 bindings->MyIpAddressEx()); 189 bindings->MyIpAddressEx());
188 190
189 EXPECT_EQ("192.168.1.1;172.22.34.1;200.100.1.2", 191 EXPECT_EQ("192.168.1.1;172.22.34.1;200.100.1.2",
190 bindings->DnsResolveEx("FOO")); 192 bindings->DnsResolveEx("FOO"));
191 } 193 }
192 194
193 } // namespace 195 } // namespace
194 } // namespace net 196 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698