summaryrefslogtreecommitdiffstats
path: root/net/base/cookie_monster_unittest.cc
diff options
context:
space:
mode:
authormmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 16:20:02 +0000
committermmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 16:20:02 +0000
commit7fad3d83abe5281e6be62f5a809da4015ad6b222 (patch)
treeab84b802185c39e77f8334e18459b86b32416a32 /net/base/cookie_monster_unittest.cc
parentf25387b62a3cccde48622d0b7fca57cd6fb16ab7 (diff)
downloadchromium_src-7fad3d83abe5281e6be62f5a809da4015ad6b222.zip
chromium_src-7fad3d83abe5281e6be62f5a809da4015ad6b222.tar.gz
chromium_src-7fad3d83abe5281e6be62f5a809da4015ad6b222.tar.bz2
Port cookie_monster, net_util, and registry_controlled_domain to POSIXish platforms
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1154 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cookie_monster_unittest.cc')
-rw-r--r--net/base/cookie_monster_unittest.cc20
1 files changed, 13 insertions, 7 deletions
diff --git a/net/base/cookie_monster_unittest.cc b/net/base/cookie_monster_unittest.cc
index 9de1464..47eb90c 100644
--- a/net/base/cookie_monster_unittest.cc
+++ b/net/base/cookie_monster_unittest.cc
@@ -495,12 +495,18 @@ TEST(CookieMonsterTest, HttpOnlyTest) {
url_google, net::CookieMonster::INCLUDE_HTTPONLY), "A=B");
}
+namespace {
+
+struct CookieDateParsingCase {
+ const char* str;
+ const bool valid;
+ const time_t epoch;
+};
+
+} // namespace
+
TEST(CookieMonsterTest, TestCookieDateParsing) {
- const struct {
- const char* str;
- const bool valid;
- const time_t epoch;
- } tests[] = {
+ const CookieDateParsingCase tests[] = {
{ "Sat, 15-Apr-17 21:01:22 GMT", true, 1492290082 },
{ "Thu, 19-Apr-2007 16:00:00 GMT", true, 1176998400 },
{ "Wed, 25 Apr 2007 21:02:13 GMT", true, 1177534933 },
@@ -572,7 +578,7 @@ TEST(CookieMonsterTest, TestCookieDateParsing) {
};
Time parsed_time;
- for (int i = 0; i < arraysize(tests); ++i) {
+ for (size_t i = 0; i < arraysize(tests); ++i) {
parsed_time = net::CookieMonster::ParseCookieTime(tests[i].str);
if (!tests[i].valid) {
EXPECT_FALSE(!parsed_time.is_null()) << tests[i].str;
@@ -783,7 +789,7 @@ TEST(CookieMonsterTest, TestTotalGarbageCollection) {
// Formerly NetUtilTest.CookieTest back when we used wininet's cookie handling.
TEST(CookieMonsterTest, NetUtilCookieTest) {
- const GURL test_url(L"http://mojo.jojo.google.izzle/");
+ const GURL test_url("http://mojo.jojo.google.izzle/");
net::CookieMonster cm;