summaryrefslogtreecommitdiffstats
path: root/devtools/client/storage/test/storage-cookies.html
blob: 97c15abaabf9a5147b93de6864624eba05695ea6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE HTML>
<html>
  <!--
  Bug 970517 - Storage inspector front end - tests
  -->
  <head>
    <meta charset="utf-8">
    <title>Storage inspector cookie test</title>
  </head>
  <body>
    <script type="application/javascript;version=1.7">
    "use strict";
    let expiresIn24Hours = new Date(Date.now() + 60 * 60 * 24 * 1000).toUTCString();
    for (let i = 1; i <= 5; i++) {
      let cookieString = "test" + i + "=value" + i +
        ";expires=" + expiresIn24Hours + ";path=/browser";
      if (i % 2) {
        cookieString += ";domain=test1.example.org";
      }
      document.cookie = cookieString;
    }
    </script>
  </body>
</html>