c265902bea
Review URL: https://chromiumcodereview.appspot.com//10836241 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10685 260f80e4-7a28-3924-810f-c04153c831b5
20 lines
484 B
Dart
20 lines
484 B
Dart
#library('StorageTest');
|
|
#import('../../pkg/unittest/unittest.dart');
|
|
#import('../../pkg/unittest/html_config.dart');
|
|
#import('dart:html');
|
|
|
|
main() {
|
|
useHtmlConfiguration();
|
|
test('GetItem', () {
|
|
final value = window.localStorage['does not exist'];
|
|
Expect.isNull(value);
|
|
});
|
|
test('SetItem', () {
|
|
final key = 'foo';
|
|
final value = 'bar';
|
|
window.localStorage[key] = value;
|
|
final stored = window.localStorage[key];
|
|
Expect.equals(value, stored);
|
|
});
|
|
}
|