Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / cookies / simple-cookies-expired.html
blobb119eaa6f52a84bc6c042320d4ba5519579eaa89
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="resources/cookies-test-style.css">
5 <script src="resources/cookies-test-pre.js"></script>
6 </head>
7 <body>
8 <p id="description"></p>
9 <div id="console"></div>
10 <script>
11 description(
12 "This test checks that cookies are correctly set using Expires."
15 clearAllCookies();
17 debug("Check that setting a simple cookie works.");
18 var date = new Date();
19 date.setTime(date.getTime() + 60 * 1000);
20 cookiesShouldBe("test=foobar; Expires=" + date.toGMTString(), "test=foobar");
21 clearCookies();
23 debug("Check setting a cookie that timed out.");
24 date.setTime(date.getTime() - 2 * 60 * 1000);
25 cookiesShouldBe("test2=foobar; Expires=" + date.toGMTString(), "");
26 clearCookies();
28 successfullyParsed = true;
29 </script>
30 <script src="resources/cookies-test-post.js"></script>
31 </body>
32 </html>