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

Side by Side Diff: tests/lib_strong/html/storage_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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
OLDNEW
1 import 'dart:html'; 1 import 'dart:html';
2 2
3 import 'package:expect/minitest.dart'; 3 import 'package:expect/minitest.dart';
4 4
5 main() { 5 main() {
6 test('GetItem', () { 6 test('GetItem', () {
7 final value = window.localStorage['does not exist']; 7 final value = window.localStorage['does not exist'];
8 expect(value, isNull); 8 expect(value, isNull);
9 }); 9 });
10 test('SetItem', () { 10 test('SetItem', () {
11 final key = 'foo'; 11 final key = 'foo';
12 final value = 'bar'; 12 final value = 'bar';
13 window.localStorage[key] = value; 13 window.localStorage[key] = value;
14 final stored = window.localStorage[key]; 14 final stored = window.localStorage[key];
15 expect(stored, value); 15 expect(stored, value);
16 }); 16 });
17 17
18 test('event', () { 18 test('event', () {
19 // Bug 8076 that not all optional params are optional in Dartium. 19 // Bug 8076 that not all optional params are optional in Dartium.
20 var event = new StorageEvent('something', oldValue: 'old', newValue: 'new', 20 var event = new StorageEvent('something',
21 url: 'url', key: 'key'); 21 oldValue: 'old', newValue: 'new', url: 'url', key: 'key');
22 expect(event is StorageEvent, isTrue); 22 expect(event is StorageEvent, isTrue);
23 expect(event.oldValue, 'old'); 23 expect(event.oldValue, 'old');
24 expect(event.newValue, 'new'); 24 expect(event.newValue, 'new');
25 }); 25 });
26 } 26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698