| Index: runtime/observatory/tests/observatory_ui/allocation_profile/element_test.dart
|
| diff --git a/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.dart b/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.dart
|
| index 5fe59b9df92e77e22dace5ab1066f80ebd6e0279..6fe8549bc0936fa7072c8e696f9ffab1d698b247 100644
|
| --- a/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.dart
|
| +++ b/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.dart
|
| @@ -128,15 +128,19 @@ main() {
|
| const clazz2 = const ClassRefMock(name: 'class2');
|
| const clazz3 = const ClassRefMock(name: 'class3');
|
| const profile = const AllocationProfileMock(members: const [
|
| + const ClassHeapStatsMock(clazz: clazz1),
|
| const ClassHeapStatsMock(
|
| clazz: clazz2,
|
| newSpace: const AllocationsMock(
|
| - accumulated: const AllocationCountMock(bytes: 10))),
|
| - const ClassHeapStatsMock(clazz: clazz3),
|
| + current: const AllocationCountMock(bytes: 10)),
|
| + oldSpace: const AllocationsMock(
|
| + current: const AllocationCountMock(bytes: 2))),
|
| const ClassHeapStatsMock(
|
| - clazz: clazz1,
|
| + clazz: clazz3,
|
| newSpace: const AllocationsMock(
|
| - accumulated: const AllocationCountMock(bytes: 5)))
|
| + current: const AllocationCountMock(bytes: 5)),
|
| + oldSpace: const AllocationsMock(
|
| + current: const AllocationCountMock(bytes: 3)))
|
| ]);
|
| final completer = new Completer<AllocationProfileMock>();
|
| final repo = new AllocationProfileRepositoryMock(
|
| @@ -151,13 +155,19 @@ main() {
|
| await e.onRendered.first;
|
| completer.complete(profile);
|
| await e.onRendered.first;
|
| + expect((e.querySelector(cTag) as ClassRefElement).cls, equals(clazz2));
|
| + e.querySelector('button.name').click();
|
| + await e.onRendered.first;
|
| expect((e.querySelector(cTag) as ClassRefElement).cls, equals(clazz1));
|
| - e.querySelector('button.bytes').click();
|
| + e.querySelector('button.name').click();
|
| await e.onRendered.first;
|
| - expect((e.querySelector(cTag) as ClassRefElement).cls, equals(clazz2));
|
| - e.querySelector('button.bytes').click();
|
| + expect((e.querySelector(cTag) as ClassRefElement).cls, equals(clazz3));
|
| + e.querySelectorAll('button.bytes').last.click();
|
| await e.onRendered.first;
|
| expect((e.querySelector(cTag) as ClassRefElement).cls, equals(clazz3));
|
| + e.querySelectorAll('button.bytes').last.click();
|
| + await e.onRendered.first;
|
| + expect((e.querySelector(cTag) as ClassRefElement).cls, equals(clazz1));
|
| e.remove();
|
| await e.onRendered.first;
|
| expect(e.children.length, isZero, reason: 'is empty');
|
|
|