|
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; |
|
6 |
|
7 var action = window.location.search.substring(1); |
|
8 |
|
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> |
|
32 |
|
33 <body> |
|
34 </body> |
|
35 </html> |