dom/tests/mochitest/localstorage/frameAppIsolation.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/tests/mochitest/localstorage/frameAppIsolation.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,35 @@
     1.4 +<html xmlns="http://www.w3.org/1999/xhtml">
     1.5 +<head>
     1.6 +  <title>slave for app isolation test</title>
     1.7 +  <script type="text/javascript">
     1.8 +  var success = false;
     1.9 +
    1.10 +  var action = window.location.search.substring(1);
    1.11 +
    1.12 +  switch (action) {
    1.13 +    case "read-no":
    1.14 +      if (localStorage.getItem("0") == null) {
    1.15 +        success = true;
    1.16 +      }
    1.17 +      break;
    1.18 +    case "write":
    1.19 +      localStorage.setItem("0", "foo");
    1.20 +      success = true;
    1.21 +      break;
    1.22 +    case "read-yes":
    1.23 +      if (localStorage.getItem("0") == "foo") {
    1.24 +        success = true;
    1.25 +      }
    1.26 +      break;
    1.27 +    case "clear":
    1.28 +      localStorage.clear();
    1.29 +      success = true;
    1.30 +      break;
    1.31 +  }
    1.32 +  success ? alert("success") : alert("failure");
    1.33 +  </script>
    1.34 +</head>
    1.35 +
    1.36 +<body>
    1.37 +</body>
    1.38 +</html>

mercurial