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

Side by Side Diff: net/http/http_auth_cache_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) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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/string_util.h" 5 #include "base/string_util.h"
6 #include "net/http/http_auth_cache.h" 6 #include "net/http/http_auth_cache.h"
7 7
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 16 matching lines...) Expand all
27 const std::wstring&, 27 const std::wstring&,
28 const HttpRequestInfo*, 28 const HttpRequestInfo*,
29 const ProxyInfo*) { 29 const ProxyInfo*) {
30 return "mock-credentials"; // Unused. 30 return "mock-credentials"; // Unused.
31 } 31 }
32 32
33 protected: 33 protected:
34 virtual bool Init(std::string::const_iterator, std::string::const_iterator) { 34 virtual bool Init(std::string::const_iterator, std::string::const_iterator) {
35 return false; // Unused. 35 return false; // Unused.
36 } 36 }
37
38 private:
39 ~MockAuthHandler() {}
37 }; 40 };
38 41
39 } // namespace 42 } // namespace
40 43
41 // Test adding and looking-up cache entries (both by realm and by path). 44 // Test adding and looking-up cache entries (both by realm and by path).
42 TEST(HttpAuthCacheTest, Basic) { 45 TEST(HttpAuthCacheTest, Basic) {
43 GURL origin("http://www.google.com"); 46 GURL origin("http://www.google.com");
44 HttpAuthCache cache; 47 HttpAuthCache cache;
45 HttpAuthCache::Entry* entry; 48 HttpAuthCache::Entry* entry;
46 49
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 CheckPathExistence(0, i, false); 299 CheckPathExistence(0, i, false);
297 300
298 for (int i = 0; i < kMaxPaths; ++i) 301 for (int i = 0; i < kMaxPaths; ++i)
299 CheckPathExistence(0, i + 3, true); 302 CheckPathExistence(0, i + 3, true);
300 303
301 for (int i = 0; i < kMaxRealms; ++i) 304 for (int i = 0; i < kMaxRealms; ++i)
302 CheckRealmExistence(i, true); 305 CheckRealmExistence(i, true);
303 } 306 }
304 307
305 } // namespace net 308 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698