Index: dart/html/LocalStorage.dart |
diff --git a/dart/html/LocalStorage.dart b/dart/html/LocalStorage.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8324bc79c16ff8175dcf59df699fc19f1566dc78 |
--- /dev/null |
+++ b/dart/html/LocalStorage.dart |
@@ -0,0 +1,17 @@ |
+#import('../../../../../dart/client/testing/unittest/unittest.dart'); |
+#import('dart:html'); |
+ |
+main() { |
+ forLayoutTests(); |
+ test('GetItem', () { |
+ final value = window.localStorage.getItem('does not exist'); |
+ Expect.isNull(value); |
+ }); |
+ test('SetItem', () { |
+ final key = 'foo'; |
+ final value = 'bar'; |
+ window.localStorage.setItem(key, value); |
+ final stored = window.localStorage.getItem(key); |
+ Expect.equals(value, stored); |
+ }); |
+} |