Fixed incorrect test descriptions and bugs in cookie and window code