This commit is contained in:
dwitte@stanford.edu 2007-11-16 23:07:24 -08:00
Родитель 74007729dc
Коммит 77ee93dd71
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -795,6 +795,12 @@ main(PRInt32 argc, char *argv[])
name += NS_LITERAL_CSTRING("=creation");
SetACookie(cookieService, "http://creation.ordering.tests/", nsnull, name.get(), nsnull);
if (i == 9) {
// sleep a couple of seconds, to make sure the first 10 cookies are older than
// subsequent ones. (lastAccessed time is only measured with a resolution of 1 second.)
PR_Sleep(2 * PR_TicksPerSecond());
}
if (i >= 10) {
expected += name;
if (i < 59)
@ -812,6 +818,12 @@ main(PRInt32 argc, char *argv[])
host.AppendInt(i);
host += NS_LITERAL_CSTRING(".tests/");
SetACookie(cookieService, host.get(), nsnull, "test=eviction", nsnull);
if (i == 9) {
// sleep a couple of seconds, to make sure the first 10 cookies are older than
// subsequent ones. (lastAccessed time is only measured with a resolution of 1 second.)
PR_Sleep(2 * PR_TicksPerSecond());
}
}
rv[1] = NS_SUCCEEDED(cookieMgr->GetEnumerator(getter_AddRefs(enumerator)));
i = 0;