fix test.

git-svn-id: svn://10.0.0.236/trunk@239569 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dwitte%stanford.edu 2007-11-17 07:07:24 +00:00
parent d39bb2a997
commit a65c25ba0d

View File

@ -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;