bc75856e54
expose ServiceWorker, removed query and queryAll from in dart:html, added constructor to MessageChannel and removed getCssCanvasContext. Fixed all tests using query and queryAll. Fixes https://github.com/dart-lang/sdk/issues/25664 Fixes https://github.com/dart-lang/sdk/issues/26349 Fixes https://github.com/dart-lang/sdk/issues/32323 Fixes https://github.com/dart-lang/sdk/issues/32659 Fixes https://github.com/dart-lang/sdk/issues/32675 R=kevmoo@google.com Change-Id: I687471e80b8fe9c7040673113f424dbaab7c64d4 Reviewed-on: https://dart-review.googlesource.com/48381 Commit-Queue: Terry Lucas <terry@google.com> Reviewed-by: Kevin Moore <kevmoo@google.com>
36 lines
1.0 KiB
Dart
36 lines
1.0 KiB
Dart
library DartObjectLocalStorageTest;
|
|
|
|
import 'package:unittest/unittest.dart';
|
|
import 'package:unittest/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.append(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.querySelector('#test');
|
|
expect(element, equals(test));
|
|
});
|
|
}
|