Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: dart/html/LocalStorage.dart

Issue 9147009: Added new html/LocalStorage test (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit/LayoutTests
Patch Set: Enable working tests Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/dom/Storage.dart ('k') | dart/html/LocalStorage.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ });
+}
« no previous file with comments | « dart/dom/Storage.dart ('k') | dart/html/LocalStorage.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698