summaryrefslogtreecommitdiffstats
path: root/devtools/client/storage/test/storage-cookies.html
blob: c0d0522961227ab52546bb311d0c7568c70f51ea (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">
    "use strict";
    const 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>