Lines Matching refs:cookies
55 // * Two secure cookies (.c.b.a, w.c.b.a)
56 // * Two domain path cookies (.c.b.a/dir1, .c.b.a/dir1/dir2)
57 // * Two host path cookies (w.c.b.a/dir1, w.c.b.a/dir1/dir2)
59 // Domain cookies
71 // Host cookies
87 // Secure cookies
95 // Domain path cookies
105 // Host path cookies
296 // TODO some better test cases for invalid cookies.
382 // Test and make sure we find domain cookies on the same domain.
419 // Test that cookies can bet set on higher level domains.
547 { // IP addresses should not be able to set domain cookies.
561 // Test host cookies, and setting of cookies on TLD.
573 EXPECT_EQ("", cm->GetCookies(GURL("http://hopefully-no-cookies.com/")));
582 EXPECT_EQ("", cm->GetCookies(GURL("http://hopefully-no-cookies.com./")));
611 { // Intranet URLs should only be able to set host cookies.
621 // Test reading/writing cookies when the domain ends with a period,
639 EXPECT_EQ(cm->GetCookies(GURL("http://hopefully-no-cookies.com/")), "");
921 // Create 3 cookies with creation date of today, yesterday and the day before.
932 // Now effectively delete all cookies just created (1 is remaining).
949 // Create 3 cookies with creation date of today, yesterday and the day before.
1044 // Add a bunch of cookies on a single host, should purge them.
1051 std::string cookies = cm->GetCookies(url_google);
1052 // Make sure we find it in the cookies.
1053 EXPECT_NE(cookies.find(cookie), std::string::npos);
1054 // Count the number of cookies.
1055 EXPECT_LE(CountInString(cookies, '='), domain_max_cookies);
1059 // Add a bunch of cookies on multiple hosts within a single eTLD.
1130 // test that we can retrieve all cookies:
1143 CookieList cookies = cm->GetAllCookies();
1144 for (CookieList::iterator it = cookies.begin();
1145 it != cookies.end(); ++it)
1172 // Only cm_foo should allow foo:// cookies.
1208 // Check cookies for url.
1209 CookieList cookies = cm->GetAllCookiesForURL(url_google);
1210 CookieList::iterator it = cookies.begin();
1212 ASSERT_TRUE(it != cookies.end());
1216 ASSERT_TRUE(++it != cookies.end());
1220 ASSERT_TRUE(++it == cookies.end());
1222 // Check cookies for url excluding http-only cookies.
1223 cookies =
1225 it = cookies.begin();
1227 ASSERT_TRUE(it != cookies.end());
1231 ASSERT_TRUE(++it == cookies.end());
1233 // Test secure cookies.
1234 cookies = cm->GetAllCookiesForURL(url_google_secure);
1235 it = cookies.begin();
1237 ASSERT_TRUE(it != cookies.end());
1241 ASSERT_TRUE(++it != cookies.end());
1245 ASSERT_TRUE(++it != cookies.end());
1249 ASSERT_TRUE(++it == cookies.end());
1273 CookieList cookies = cm->GetAllCookiesForURL(url_google_foo);
1274 CookieList::iterator it = cookies.begin();
1276 ASSERT_TRUE(it != cookies.end());
1280 ASSERT_TRUE(++it != cookies.end());
1284 ASSERT_TRUE(++it == cookies.end());
1286 cookies = cm->GetAllCookiesForURL(url_google_bar);
1287 it = cookies.begin();
1289 ASSERT_TRUE(it != cookies.end());
1293 ASSERT_TRUE(++it != cookies.end());
1297 ASSERT_TRUE(++it == cookies.end());
1313 CookieList cookies = cm->GetAllCookies();
1315 EXPECT_EQ(expected_size, cookies.size());
1316 for (CookieList::iterator it = cookies.begin();
1317 it != cookies.end(); ++it) {
1323 // Test that overwriting persistent cookies deletes the old one from the
1390 // equivalent cookies. This situation should be handled by removing the
1400 // We will fill some initial cookies into the PersistentCookieStore,
1407 // Insert 4 cookies with name "X" on path "/", with varying creation
1432 // Insert 2 cookies with name "X" on path "/2", with varying creation
1452 // Inject our initial cookies into the mock PersistentCookieStore.
1474 // Tests importing from a persistent cookie store that contains cookies
1476 // dropping the cookies before insertion/visibility to user.
1488 // Insert 8 cookies, four with the current time as creation times, and
1490 // two cookies remaining, but which two (other than that there should
1503 // Inject our initial cookies into the mock PersistentCookieStore.
1631 CookieList cookies = cm->GetAllCookiesForURL(url_google_foo);
1632 CookieList::iterator it = cookies.begin();
1634 ASSERT_TRUE(it != cookies.end());
1643 ASSERT_TRUE(++it == cookies.end());
1645 cookies = cm->GetAllCookiesForURL(url_google_bar);
1646 it = cookies.begin();
1648 ASSERT_TRUE(it != cookies.end());
1656 ASSERT_TRUE(++it == cookies.end());
1658 cookies = cm->GetAllCookiesForURL(url_google_secure);
1659 it = cookies.begin();
1661 ASSERT_TRUE(it != cookies.end());
1669 ASSERT_TRUE(++it == cookies.end());
1681 // path cookies. http_only, secure, and paths are ignored by
1682 // this call, and domain cookies arent touched.
1740 // Add in three cookies through every public interface to the
1832 // Test that cookies transfer from/to the backing store correctly.
1834 // Store details for cookies transforming through the backing store interface.
1863 // Create new cookies and flush them to the store.
1880 CookieList cookies(cmin->GetAllCookies());
1881 ASSERT_EQ(2u, cookies.size());
1884 std::swap(cookies[0], cookies[1]);
1888 const CookieMonster::CanonicalCookie* output = &cookies[output_index];
1906 // Put a random set of cookies into a monster and make sure
1927 CookieList cookies(cm->GetAllCookiesForURL(
1929 ASSERT_EQ(5u, cookies.size());
1930 EXPECT_EQ("d", cookies[i++].Name());
1931 EXPECT_EQ("a", cookies[i++].Name());
1932 EXPECT_EQ("e", cookies[i++].Name());
1933 EXPECT_EQ("b", cookies[i++].Name());
1934 EXPECT_EQ("c", cookies[i++].Name());
1939 CookieList cookies(cm->GetAllCookies());
1940 ASSERT_EQ(6u, cookies.size());
1941 EXPECT_EQ("d", cookies[i++].Name());
1942 EXPECT_EQ("a", cookies[i++].Name());
1943 EXPECT_EQ("e", cookies[i++].Name());
1944 EXPECT_EQ("g", cookies[i++].Name());
1945 EXPECT_EQ("b", cookies[i++].Name());
1946 EXPECT_EQ("c", cookies[i++].Name());
1951 // Function for creating a CM with a number of cookies in it,
1963 // get rid of cookies when we should). The perftest is probing for
1967 // First we check to make sure that a whole lot of recent cookies
1978 // time and size of store to make sure we only get rid of cookies when
1988 // A whole lot of recent cookies; gc shouldn't happen.
1995 // Some old cookies, but still overflowing max.
2002 // Old cookies enough to bring us right down to our purge line.
2009 // Old cookies enough to bring below our purge line (which we
2074 // This test checks that keep expired cookies flag is working.