Files
sdk/tests/html/dart_object_local_storage_test.dart
T
gram@google.com 981c4b11df Restructure pkg/unittest and pkg/webdriver to follow the pub conventions.
This means all imports of unittest in our test code had to change to include 'lib' in the path.
While doing that change I changed the library/imports to the new syntax in the affected files.
Review URL: https://codereview.chromium.org//11301046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14443 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 23:09:47 +00:00

35 lines
1.0 KiB
Dart

library DartObjectLocalStorageTest;
import '../../pkg/unittest/lib/unittest.dart';
import '../../pkg/unittest/lib/html_config.dart';
import 'dart:html';
// TODO(vsm): Rename this to wrapper_caching_test or similar. It's
// basically a port of dom/dart_object_local_storage_test.dart. For
// wrapping implementation of dart:html (i.e., the dartium one), it is
// effectively testing dart_object_local_storage in the underlying dom
// object.
main() {
useHtmlConfiguration();
BodyElement body = document.body;
Storage localStorage = window.localStorage;
Storage sessionStorage = window.sessionStorage;
var element = new Element.tag('canvas');
element.id = 'test';
body.nodes.add(element);
test('body', () {
expect(body, equals(document.body));
});
test('localStorage', () {
expect(localStorage, equals(window.localStorage));
});
test('sessionStorage', () {
expect(sessionStorage, equals(window.sessionStorage));
});
test('unknown', () {
var test = document.query('#test');
expect(element, equals(test));
});
}