browser/components/sessionstore/test/browser_sessionStorage.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <!DOCTYPE html>
     2 <html lang="en">
     3   <head>
     4     <meta charset="utf-8">
     5     <title>browser_sessionStorage.html</title>
     6   </head>
     7   <body>
     8     <script type="text/javascript;version=1.8">
     9       let isOuter = window == window.top;
    10       let args = window.location.search.slice(1).split("&");
    11       let rand = args[0];
    13       if (isOuter) {
    14         let iframe = document.createElement("iframe");
    15         let isSecure = args.indexOf("secure") > -1;
    16         let scheme = isSecure ? "https" : "http";
    17         iframe.setAttribute("src", scheme + "://example.com" + location.pathname + "?" + rand);
    18         document.body.appendChild(iframe);
    19       }
    21       if (sessionStorage.length === 0) {
    22         sessionStorage.test = (isOuter ? "outer" : "inner") + "-value-" + rand;
    23       }
    24     </script>
    25   </body>
    26 </html>

mercurial