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

Side by Side Diff: tests/html/dart_object_local_storage_test.dart

Issue 14883008: use .append instead of .nodes.add (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: revert node_test and element_test Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/html/css_test.dart ('k') | tests/html/datalistelement_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library DartObjectLocalStorageTest; 1 library DartObjectLocalStorageTest;
2 import '../../pkg/unittest/lib/unittest.dart'; 2 import '../../pkg/unittest/lib/unittest.dart';
3 import '../../pkg/unittest/lib/html_config.dart'; 3 import '../../pkg/unittest/lib/html_config.dart';
4 import 'dart:html'; 4 import 'dart:html';
5 5
6 // TODO(vsm): Rename this to wrapper_caching_test or similar. It's 6 // TODO(vsm): Rename this to wrapper_caching_test or similar. It's
7 // basically a port of dom/dart_object_local_storage_test.dart. For 7 // basically a port of dom/dart_object_local_storage_test.dart. For
8 // wrapping implementation of dart:html (i.e., the dartium one), it is 8 // wrapping implementation of dart:html (i.e., the dartium one), it is
9 // effectively testing dart_object_local_storage in the underlying dom 9 // effectively testing dart_object_local_storage in the underlying dom
10 // object. 10 // object.
11 main() { 11 main() {
12 useHtmlConfiguration(); 12 useHtmlConfiguration();
13 13
14 BodyElement body = document.body; 14 BodyElement body = document.body;
15 Storage localStorage = window.localStorage; 15 Storage localStorage = window.localStorage;
16 Storage sessionStorage = window.sessionStorage; 16 Storage sessionStorage = window.sessionStorage;
17 var element = new Element.tag('canvas'); 17 var element = new Element.tag('canvas');
18 element.id = 'test'; 18 element.id = 'test';
19 body.nodes.add(element); 19 body.append(element);
20 20
21 test('body', () { 21 test('body', () {
22 expect(body, equals(document.body)); 22 expect(body, equals(document.body));
23 }); 23 });
24 test('localStorage', () { 24 test('localStorage', () {
25 expect(localStorage, equals(window.localStorage)); 25 expect(localStorage, equals(window.localStorage));
26 }); 26 });
27 test('sessionStorage', () { 27 test('sessionStorage', () {
28 expect(sessionStorage, equals(window.sessionStorage)); 28 expect(sessionStorage, equals(window.sessionStorage));
29 }); 29 });
30 test('unknown', () { 30 test('unknown', () {
31 var test = document.query('#test'); 31 var test = document.query('#test');
32 expect(element, equals(test)); 32 expect(element, equals(test));
33 }); 33 });
34 } 34 }
OLDNEW
« no previous file with comments | « tests/html/css_test.dart ('k') | tests/html/datalistelement_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698