OLD | NEW |
1 #library('DartObjectLocalStorageTest'); | 1 #library('DartObjectLocalStorageTest'); |
2 #import('../../../../lib/unittest/unittest.dart'); | 2 #import('../../lib/unittest/unittest.dart'); |
3 #import('../../../../lib/unittest/dom_config.dart'); | 3 #import('../../lib/unittest/dom_config.dart'); |
4 #import('dart:dom'); | 4 #import('dart:dom'); |
5 | 5 |
6 verify(var object) { | 6 verify(var object) { |
7 final value = window.document; | 7 final value = window.document; |
8 object.dartObjectLocalStorage = value; | 8 object.dartObjectLocalStorage = value; |
9 final stored = object.dartObjectLocalStorage; | 9 final stored = object.dartObjectLocalStorage; |
10 Expect.equals(value, stored); | 10 Expect.equals(value, stored); |
11 } | 11 } |
12 | 12 |
13 main() { | 13 main() { |
(...skipping 11 matching lines...) Expand all Loading... |
25 verify(storage); | 25 verify(storage); |
26 }); | 26 }); |
27 test('unknown', () { | 27 test('unknown', () { |
28 var element = document.createElement('canvas'); | 28 var element = document.createElement('canvas'); |
29 element.id = 'test'; | 29 element.id = 'test'; |
30 document.body.appendChild(element); | 30 document.body.appendChild(element); |
31 element = document.getElementById('test'); | 31 element = document.getElementById('test'); |
32 verify(element); | 32 verify(element); |
33 }); | 33 }); |
34 } | 34 } |
OLD | NEW |