| <html> |
| <head> |
| <title>Local Storage Test</title> |
| <script type="text/javascript"> |
| function get() { |
| var x = localStorage.getItem('foo'); |
| document.location = '#get'; // Because NavigateToURL() in the UI test |
| // waits for a location change. |
| } |
| function set() { |
| localStorage.setItem('foo', 'bar'); |
| document.location = '#set'; |
| } |
| function clear() { |
| localStorage.clear(); |
| document.location = '#clear'; |
| } |
| </script> |
| </head> |
| |
| <body> |
| <ul> |
| <li><a href="javascript:get()">Get item from localStorage</a> |
| <li><a href="javascript:set()">Set item in localStorage</a> |
| <li><a href="javascript:clear()">Clear localStorage</a> |
| </ul> |
| </body> |
| </html> |