summaryrefslogtreecommitdiffstats
path: root/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_concurrent_page.html
blob: 96d3b74c7c5593f2e1314bfbc88e7c229fe02c88 (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
25
26
27
28
29
30
31
32
33
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
  var oGetVars = {};

  if (window.location.search.length > 1) {
    for (var aItKey, nKeyId = 0, aCouples = window.location.search.substr(1).split("&");
         nKeyId < aCouples.length;
         nKeyId++) {
      aItKey = aCouples[nKeyId].split("=");
      oGetVars[unescape(aItKey[0])] = aItKey.length > 1 ? unescape(aItKey[1]) : "";
    }
  }

  if (oGetVars.initial == "true") {
    localStorage.clear();
  }

  if (oGetVars.action == "set") {
    localStorage.setItem(oGetVars.name, oGetVars.value);
    document.title = localStorage.getItem(oGetVars.name) + "|" + localStorage.length;
  } else if (oGetVars.action == "get") {
    document.title = localStorage.getItem(oGetVars.name) + "|" + localStorage.length;
  }

  if (oGetVars.final == "true") {
    localStorage.clear();
  }
</script>
</head>
<body>
</body>
</html>