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

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

Issue 3058027: Add #include utf_string_conversions.h to all files that use ASCIIToWide and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 | « ipc/ipc_message_utils.h ('k') | net/ftp/ftp_directory_listing_parser_vms.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h"
9 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 using net::FtpAuthCache; 13 using net::FtpAuthCache;
13 14
14 namespace { 15 namespace {
15 16
16 const string16 kBogus(ASCIIToUTF16("bogus")); 17 const string16 kBogus(ASCIIToUTF16("bogus"));
17 const string16 kOthername(ASCIIToUTF16("othername")); 18 const string16 kOthername(ASCIIToUTF16("othername"));
18 const string16 kOtherword(ASCIIToUTF16("otherword")); 19 const string16 kOtherword(ASCIIToUTF16("otherword"));
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // Adding one entry should cause eviction of the first entry. 147 // Adding one entry should cause eviction of the first entry.
147 cache.Add(GURL("ftp://last_host"), kUsername, kPassword); 148 cache.Add(GURL("ftp://last_host"), kUsername, kPassword);
148 EXPECT_TRUE(cache.Lookup(GURL("ftp://host0")) == NULL); 149 EXPECT_TRUE(cache.Lookup(GURL("ftp://host0")) == NULL);
149 150
150 // Remaining entries should not get evicted. 151 // Remaining entries should not get evicted.
151 for (size_t i = 1; i < FtpAuthCache::kMaxEntries; i++) { 152 for (size_t i = 1; i < FtpAuthCache::kMaxEntries; i++) {
152 EXPECT_TRUE(cache.Lookup(GURL("ftp://host" + base::IntToString(i)))); 153 EXPECT_TRUE(cache.Lookup(GURL("ftp://host" + base::IntToString(i))));
153 } 154 }
154 EXPECT_TRUE(cache.Lookup(GURL("ftp://last_host"))); 155 EXPECT_TRUE(cache.Lookup(GURL("ftp://last_host")));
155 } 156 }
OLDNEW
« no previous file with comments | « ipc/ipc_message_utils.h ('k') | net/ftp/ftp_directory_listing_parser_vms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698