dom/tests/mochitest/localstorage/frameAppIsolation.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <html xmlns="http://www.w3.org/1999/xhtml">
     2 <head>
     3   <title>slave for app isolation test</title>
     4   <script type="text/javascript">
     5   var success = false;
     7   var action = window.location.search.substring(1);
     9   switch (action) {
    10     case "read-no":
    11       if (localStorage.getItem("0") == null) {
    12         success = true;
    13       }
    14       break;
    15     case "write":
    16       localStorage.setItem("0", "foo");
    17       success = true;
    18       break;
    19     case "read-yes":
    20       if (localStorage.getItem("0") == "foo") {
    21         success = true;
    22       }
    23       break;
    24     case "clear":
    25       localStorage.clear();
    26       success = true;
    27       break;
    28   }
    29   success ? alert("success") : alert("failure");
    30   </script>
    31 </head>
    33 <body>
    34 </body>
    35 </html>

mercurial