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

Unified Diff: runtime/observatory/tests/observatory_ui/allocation_profile/element_test.dart

Issue 2767533002: Revert "Fix observatory tests broken by running dartfmt." (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
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..b7d8e2f6b83e09e92ec2f4f3efef95278105411e 100644
--- a/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.dart
@@ -31,12 +31,12 @@ main() {
test('elements created', () async {
final completer = new Completer<AllocationProfileMock>();
final repo = new AllocationProfileRepositoryMock(
- getter: expectAsync((M.IsolateRef i, bool gc, bool reset) {
- expect(i, equals(isolate));
- expect(gc, isFalse);
- expect(reset, isFalse);
- return completer.future;
- }, count: 1));
+ getter: expectAsync((M.IsolateRef i, bool gc, bool reset) {
+ expect(i, equals(isolate));
+ expect(gc, isFalse);
+ expect(reset, isFalse);
+ return completer.future;
+ }, count: 1));
final e = new AllocationProfileElement(vm, isolate, events, notif, repo);
document.body.append(e);
await e.onRendered.first;
@@ -54,37 +54,35 @@ main() {
final completer = new Completer<AllocationProfileMock>();
int step = 0;
final repo = new AllocationProfileRepositoryMock(
- getter: expectAsync((M.IsolateRef i, bool gc, bool reset) {
- expect(i, equals(isolate));
- switch (step) {
- case 0:
- expect(gc, isFalse);
- expect(reset, isFalse);
- break;
- case 1:
- expect(gc, isFalse);
- expect(reset, isTrue);
- break;
- case 2:
- expect(gc, isTrue);
- expect(reset, isFalse);
- break;
- case 3:
- expect(gc, isFalse);
- expect(reset, isFalse);
- break;
- }
- step++;
- return completer.future;
- }, count: 4));
+ getter: expectAsync((M.IsolateRef i, bool gc, bool reset) {
+ expect(i, equals(isolate));
+ switch (step) {
+ case 0:
+ expect(gc, isFalse);
+ expect(reset, isFalse);
+ break;
+ case 1:
+ expect(gc, isFalse);
+ expect(reset, isTrue);
+ break;
+ case 2:
+ expect(gc, isTrue);
+ expect(reset, isFalse);
+ break;
+ case 3:
+ expect(gc, isFalse);
+ expect(reset, isFalse);
+ break;
+ }
+ step++;
+ return completer.future;
+ }, count: 4));
final e = new AllocationProfileElement(vm, isolate, events, notif, repo);
document.body.append(e);
await e.onRendered.first;
completer.complete(const AllocationProfileMock());
await e.onRendered.first;
- e
- .querySelectorAll(rTag)
- .sublist(1, 4)
+ e.querySelectorAll(rTag).sublist(1, 4)
.forEach((NavRefreshElement e) => e.refresh());
e.remove();
await e.onRendered.first;
@@ -95,13 +93,13 @@ main() {
final completer = new Completer<AllocationProfileMock>();
int count = 0;
final repo = new AllocationProfileRepositoryMock(
- getter: expectAsync((M.IsolateRef i, bool gc, bool reset) {
- expect(i, equals(isolate));
- expect(gc, isFalse);
- expect(reset, isFalse);
- count++;
- return completer.future;
- }, count: 2));
+ getter: expectAsync((M.IsolateRef i, bool gc, bool reset) {
+ expect(i, equals(isolate));
+ expect(gc, isFalse);
+ expect(reset, isFalse);
+ count++;
+ return completer.future;
+ }, count: 2));
final e = new AllocationProfileElement(vm, isolate, events, notif, repo);
document.body.append(e);
await e.onRendered.first;
@@ -114,11 +112,11 @@ main() {
expect(count, equals(2));
// shouldn't trigger
events.add(new GCEventMock(isolate: new IsolateRefMock(id: 'another')));
- await (() async {}());
+ await (() async {} ());
e.querySelector('input[type=\'checkbox\']').click();
// shouldn't trigger
events.add(new GCEventMock(isolate: isolate));
- await (() async {}());
+ await (() async {} ());
e.remove();
await e.onRendered.first;
expect(e.children.length, isZero, reason: 'is empty');
@@ -128,24 +126,22 @@ main() {
const clazz2 = const ClassRefMock(name: 'class2');
const clazz3 = const ClassRefMock(name: 'class3');
const profile = const AllocationProfileMock(members: const [
- const ClassHeapStatsMock(
- clazz: clazz2,
- newSpace: const AllocationsMock(
- accumulated: const AllocationCountMock(bytes: 10))),
+ const ClassHeapStatsMock(clazz: clazz2, newSpace: const AllocationsMock(
+ accumulated: const AllocationCountMock(bytes: 10)
+ )),
const ClassHeapStatsMock(clazz: clazz3),
- const ClassHeapStatsMock(
- clazz: clazz1,
- newSpace: const AllocationsMock(
- accumulated: const AllocationCountMock(bytes: 5)))
+ const ClassHeapStatsMock(clazz: clazz1, newSpace: const AllocationsMock(
+ accumulated: const AllocationCountMock(bytes: 5)
+ ))
]);
final completer = new Completer<AllocationProfileMock>();
final repo = new AllocationProfileRepositoryMock(
- getter: expectAsync((M.IsolateRef i, bool gc, bool reset) {
- expect(i, equals(isolate));
- expect(gc, isFalse);
- expect(reset, isFalse);
- return completer.future;
- }, count: 1));
+ getter: expectAsync((M.IsolateRef i, bool gc, bool reset) {
+ expect(i, equals(isolate));
+ expect(gc, isFalse);
+ expect(reset, isFalse);
+ return completer.future;
+ }, count: 1));
final e = new AllocationProfileElement(vm, isolate, events, notif, repo);
document.body.append(e);
await e.onRendered.first;

Powered by Google App Engine
This is Rietveld 408576698