add unit tests for previous checkin.

This commit is contained in:
dwitte%stanford.edu 2007-07-11 03:28:01 +00:00
Родитель d11057da3c
Коммит 1d02c1a78d
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -681,8 +681,13 @@ main(PRInt32 argc, char *argv[])
SetACookie(cookieService, "http://httponly.test/", nsnull, "test=not-httponly", nsnull);
GetACookieNoHttp(cookieService, "http://httponly.test/", getter_Copies(cookie));
rv[7] = CheckResult(cookie.get(), MUST_EQUAL, "test=not-httponly");
// scripts should not be able to set httponly cookies by replacing an existing non-httponly cookie
SetACookie(cookieService, "http://httponly.test/", nsnull, "test=not-httponly", nsnull);
SetACookieNoHttp(cookieService, "http://httponly.test/", "test=httponly; httponly");
GetACookieNoHttp(cookieService, "http://httponly.test/", getter_Copies(cookie));
rv[8] = CheckResult(cookie.get(), MUST_EQUAL, "test=not-httponly");
allTestsPassed = PrintResult(rv, 8) && allTestsPassed;
allTestsPassed = PrintResult(rv, 9) && allTestsPassed;
// *** nsICookieManager{2} interface tests