Lines Matching defs:cache

34   FtpAuthCache cache;
40 EXPECT_TRUE(cache.Lookup(origin1) == NULL);
43 cache.Add(origin1, net::AuthCredentials(kUsername1, kPassword1));
44 FtpAuthCache::Entry* entry1 = cache.Lookup(origin1);
51 cache.Add(origin2, net::AuthCredentials(kUsername2, kPassword2));
52 FtpAuthCache::Entry* entry2 = cache.Lookup(origin2);
59 EXPECT_EQ(entry1, cache.Lookup(origin1));
62 cache.Add(origin1, net::AuthCredentials(kUsername3, kPassword3));
63 FtpAuthCache::Entry* entry3 = cache.Lookup(origin1);
70 cache.Remove(origin1, net::AuthCredentials(kUsername3, kPassword3));
71 EXPECT_TRUE(cache.Lookup(origin1) == NULL);
74 cache.Remove(origin1, net::AuthCredentials(kUsername3, kPassword3));
75 EXPECT_TRUE(cache.Lookup(origin1) == NULL);
81 FtpAuthCache cache;
86 cache.Add(origin1, net::AuthCredentials(kUsername, kPassword));
87 cache.Add(origin2, net::AuthCredentials(kUsername, kPassword));
89 EXPECT_NE(cache.Lookup(origin1), cache.Lookup(origin2));
97 FtpAuthCache cache;
100 cache.Add(GURL("ftp://HoSt:21"), net::AuthCredentials(kUsername, kPassword));
103 FtpAuthCache::Entry* entry1 = cache.Lookup(GURL("ftp://HoSt:21"));
105 EXPECT_EQ(entry1, cache.Lookup(GURL("ftp://host:21")));
106 EXPECT_EQ(entry1, cache.Lookup(GURL("ftp://host")));
109 cache.Add(GURL("ftp://host"), net::AuthCredentials(kOthername, kOtherword));
110 FtpAuthCache::Entry* entry2 = cache.Lookup(GURL("ftp://HoSt:21"));
117 cache.Remove(GURL("ftp://HOsT"),
119 EXPECT_TRUE(cache.Lookup(GURL("ftp://host")) == NULL);
123 FtpAuthCache cache;
125 cache.Add(GURL("ftp://host"), net::AuthCredentials(kUsername, kPassword));
126 EXPECT_TRUE(cache.Lookup(GURL("ftp://host")));
129 cache.Remove(GURL("ftp://host"), net::AuthCredentials(kBogus, kBogus));
130 EXPECT_TRUE(cache.Lookup(GURL("ftp://host")));
133 cache.Remove(GURL("ftp://host"), net::AuthCredentials(kUsername, kPassword));
134 EXPECT_TRUE(cache.Lookup(GURL("ftp://host")) == NULL);
138 FtpAuthCache cache;
141 cache.Add(GURL("ftp://host" + base::IntToString(i)),
147 EXPECT_TRUE(cache.Lookup(GURL("ftp://host" + base::IntToString(i))));
151 cache.Add(GURL("ftp://last_host"),
153 EXPECT_TRUE(cache.Lookup(GURL("ftp://host0")) == NULL);
157 EXPECT_TRUE(cache.Lookup(GURL("ftp://host" + base::IntToString(i))));
159 EXPECT_TRUE(cache.Lookup(GURL("ftp://last_host")));