Index: runtime/observatory/tests/observatory_ui/heap_snapshot/element_test.dart |
diff --git a/runtime/observatory/tests/observatory_ui/heap_snapshot/element_test.dart b/runtime/observatory/tests/observatory_ui/heap_snapshot/element_test.dart |
index 6e7b6160be86ecb7e896531ba7928c6781f6c3a5..1136e392686fa435e858b40ed542a621f6d29335 100644 |
--- a/runtime/observatory/tests/observatory_ui/heap_snapshot/element_test.dart |
+++ b/runtime/observatory/tests/observatory_ui/heap_snapshot/element_test.dart |
@@ -22,37 +22,44 @@ main() { |
final snapshots = new HeapSnapshotRepositoryMock(); |
final instances = new InstanceRepositoryMock(); |
test('instantiation', () { |
- final e = new HeapSnapshotElement( |
- vm, isolate, events, notifs, snapshots, instances); |
+ final e = new HeapSnapshotElement(vm, isolate, events, notifs, snapshots, |
+ instances); |
expect(e, isNotNull, reason: 'element correctly created'); |
}); |
test('elements created', () async { |
- final controller = |
- new StreamController<M.HeapSnapshotLoadingProgressEvent>.broadcast(); |
- final snapshots = |
- new HeapSnapshotRepositoryMock(getter: (M.IsolateRef i, bool gc) { |
- expect(i, equals(isolate)); |
- expect(gc, isFalse); |
- return controller.stream; |
- }); |
- final e = new HeapSnapshotElement( |
- vm, isolate, events, notifs, snapshots, instances); |
+ final controller |
+ = new StreamController<M.HeapSnapshotLoadingProgressEvent>.broadcast(); |
+ final snapshots = new HeapSnapshotRepositoryMock( |
+ getter: (M.IsolateRef i, bool gc) { |
+ expect(i, equals(isolate)); |
+ expect(gc, isFalse); |
+ return controller.stream; |
+ } |
+ ); |
+ final e = new HeapSnapshotElement(vm, isolate, events, notifs, snapshots, |
+ instances); |
document.body.append(e); |
await e.onRendered.first; |
expect(e.children.length, isNonZero, reason: 'has elements'); |
expect(e.querySelectorAll(tTag).length, isZero); |
controller.add(const HeapSnapshotLoadingProgressEventMock( |
- progress: const HeapSnapshotLoadingProgressMock( |
- status: M.HeapSnapshotLoadingStatus.fetching))); |
+ progress: const HeapSnapshotLoadingProgressMock( |
+ status: M.HeapSnapshotLoadingStatus.fetching |
+ ) |
+ )); |
await e.onRendered.first; |
expect(e.querySelectorAll(tTag).length, isZero); |
controller.add(const HeapSnapshotLoadingProgressEventMock( |
- progress: const HeapSnapshotLoadingProgressMock( |
- status: M.HeapSnapshotLoadingStatus.loading))); |
+ progress: const HeapSnapshotLoadingProgressMock( |
+ status: M.HeapSnapshotLoadingStatus.loading |
+ ) |
+ )); |
controller.add(new HeapSnapshotLoadingProgressEventMock( |
- progress: new HeapSnapshotLoadingProgressMock( |
- status: M.HeapSnapshotLoadingStatus.loaded, |
- snapshot: new HeapSnapshotMock(timestamp: new DateTime.now())))); |
+ progress: new HeapSnapshotLoadingProgressMock( |
+ status: M.HeapSnapshotLoadingStatus.loaded, |
+ snapshot: new HeapSnapshotMock(timestamp: new DateTime.now()) |
+ ) |
+ )); |
controller.close(); |
await e.onRendered.first; |
expect(e.querySelectorAll(tTag).length, equals(1)); |