browser/components/sessionstore/test/browser_sessionStorage.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/components/sessionstore/test/browser_sessionStorage.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,26 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html lang="en">
     1.6 +  <head>
     1.7 +    <meta charset="utf-8">
     1.8 +    <title>browser_sessionStorage.html</title>
     1.9 +  </head>
    1.10 +  <body>
    1.11 +    <script type="text/javascript;version=1.8">
    1.12 +      let isOuter = window == window.top;
    1.13 +      let args = window.location.search.slice(1).split("&");
    1.14 +      let rand = args[0];
    1.15 +
    1.16 +      if (isOuter) {
    1.17 +        let iframe = document.createElement("iframe");
    1.18 +        let isSecure = args.indexOf("secure") > -1;
    1.19 +        let scheme = isSecure ? "https" : "http";
    1.20 +        iframe.setAttribute("src", scheme + "://example.com" + location.pathname + "?" + rand);
    1.21 +        document.body.appendChild(iframe);
    1.22 +      }
    1.23 +
    1.24 +      if (sessionStorage.length === 0) {
    1.25 +        sessionStorage.test = (isOuter ? "outer" : "inner") + "-value-" + rand;
    1.26 +      }
    1.27 +    </script>
    1.28 +  </body>
    1.29 +</html>

mercurial