dom/tests/mochitest/localstorage/frameAppIsolation.html

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     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