Home | History | Annotate | Download | only in resources

Lines Matching full:cookie

155 // We do not set the cookie right away as it is forbidden by the XHR spec.
157 function setCookies(cookie)
162 xhr.setRequestHeader("SET_COOKIE", cookie);
166 cookies.push(cookie);
175 // Normalize a cookie string
176 function normalizeCookie(cookie)
178 // Split the cookie string, sort it and then put it back together.
179 return cookie.split('; ').sort().join('; ');
188 var cookie = xhr.getResponseHeader("HTTP_COOKIE") == null ? '"null"' : xhr.getResponseHeader("HTTP_COOKIE");
190 // Normalize the cookie strings.
192 cookie = normalizeCookie(cookie);
194 if (cookie === result)
195 testPassed("cookie is '" + cookie + "'.");
197 testFailed("cookie was '" + cookie + "'. Expected '" + result + "'.");
203 while (cookieString = document.cookie) {
217 var cookie;
218 // We need to clean one cookie at a time because to be cleared the
219 // cookie must be exactly the same except for the "Max-Age"
221 while (cookie = cookies.pop()) {
223 xhr.setRequestHeader("CLEAR_COOKIE", cookie);
231 // This method check one cookie at a time.
235 testFailed("could not set cookie(s) " + cookiesToSet);