Home | History | Annotate | Download | only in script-tests
      1 description(
      2 "This test checks that cookies are correctly set using Expires."
      3 );
      4 
      5 clearAllCookies();
      6 
      7 debug("Check that setting a simple cookie works.");
      8 var date = new Date();
      9 date.setTime(date.getTime() + 60 * 1000);
     10 cookiesShouldBe("test=foobar; Expires=" + date.toGMTString(), "test=foobar");
     11 clearCookies();
     12 
     13 debug("Check setting a cookie that timed out.");
     14 date.setTime(date.getTime() - 2 * 60 * 1000);
     15 cookiesShouldBe("test2=foobar; Expires=" + date.toGMTString(), "");
     16 clearCookies();
     17 
     18 successfullyParsed = true;
     19