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

Side by Side Diff: net/ftp/ftp_auth_cache_unittest.cc

Issue 6362186595172352: net: Migrate from googleurl/ includes to url/ ones. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and revert nss_ocsp.cc changes Created 7 years, 5 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/ftp/ftp_auth_cache.cc ('k') | net/ftp/ftp_request_info.h » ('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) 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/ftp/ftp_auth_cache.h" 5 #include "net/ftp/ftp_auth_cache.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "googleurl/src/gurl.h"
11 #include "net/base/auth.h" 10 #include "net/base/auth.h"
12 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "url/gurl.h"
13 13
14 using net::FtpAuthCache; 14 using net::FtpAuthCache;
15 15
16 namespace { 16 namespace {
17 17
18 const base::string16 kBogus(ASCIIToUTF16("bogus")); 18 const base::string16 kBogus(ASCIIToUTF16("bogus"));
19 const base::string16 kOthername(ASCIIToUTF16("othername")); 19 const base::string16 kOthername(ASCIIToUTF16("othername"));
20 const base::string16 kOtherword(ASCIIToUTF16("otherword")); 20 const base::string16 kOtherword(ASCIIToUTF16("otherword"));
21 const base::string16 kPassword(ASCIIToUTF16("password")); 21 const base::string16 kPassword(ASCIIToUTF16("password"));
22 const base::string16 kPassword1(ASCIIToUTF16("password1")); 22 const base::string16 kPassword1(ASCIIToUTF16("password1"));
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 cache.Add(GURL("ftp://last_host"), 150 cache.Add(GURL("ftp://last_host"),
151 net::AuthCredentials(kUsername, kPassword)); 151 net::AuthCredentials(kUsername, kPassword));
152 EXPECT_TRUE(cache.Lookup(GURL("ftp://host0")) == NULL); 152 EXPECT_TRUE(cache.Lookup(GURL("ftp://host0")) == NULL);
153 153
154 // Remaining entries should not get evicted. 154 // Remaining entries should not get evicted.
155 for (size_t i = 1; i < FtpAuthCache::kMaxEntries; i++) { 155 for (size_t i = 1; i < FtpAuthCache::kMaxEntries; i++) {
156 EXPECT_TRUE(cache.Lookup(GURL("ftp://host" + base::IntToString(i)))); 156 EXPECT_TRUE(cache.Lookup(GURL("ftp://host" + base::IntToString(i))));
157 } 157 }
158 EXPECT_TRUE(cache.Lookup(GURL("ftp://last_host"))); 158 EXPECT_TRUE(cache.Lookup(GURL("ftp://last_host")));
159 } 159 }
OLDNEW
« no previous file with comments | « net/ftp/ftp_auth_cache.cc ('k') | net/ftp/ftp_request_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698