<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="resources/cookies-test-style.css">
<script src="resources/cookies-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description(
"This test checks that cookies are correctly set using Expires."
);

clearAllCookies();

debug("Check that setting a simple cookie works.");
var date = new Date();
date.setTime(date.getTime() + 60 * 1000);
cookiesShouldBe("test=foobar; Expires=" + date.toGMTString(), "test=foobar");
clearCookies();

debug("Check setting a cookie that timed out.");
date.setTime(date.getTime() - 2 * 60 * 1000);
cookiesShouldBe("test2=foobar; Expires=" + date.toGMTString(), "");
clearCookies();

successfullyParsed = true;
</script>
<script src="resources/cookies-test-post.js"></script>
</body>
</html>
