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

Unified Diff: runtime/observatory/tests/service/native_metrics_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/service/native_metrics_test.dart
diff --git a/runtime/observatory/tests/service/native_metrics_test.dart b/runtime/observatory/tests/service/native_metrics_test.dart
index 0803fabc684eaec119fc29b72f51c67fae8b0043..dd713a26071030197206bea3f2e79eb6d53c35dd 100644
--- a/runtime/observatory/tests/service/native_metrics_test.dart
+++ b/runtime/observatory/tests/service/native_metrics_test.dart
@@ -16,37 +16,40 @@ void script() {
}
var tests = [
+
(Isolate isolate) async {
Map metrics = await isolate.refreshNativeMetrics();
expect(metrics.length, greaterThan(1));
expect(metrics.length, greaterThan(1));
- var foundOldHeapCapacity =
- metrics.values.any((m) => m.name == 'heap.old.capacity');
+ var foundOldHeapCapacity = metrics.values.any(
+ (m) => m.name == 'heap.old.capacity');
expect(foundOldHeapCapacity, equals(true));
},
+
(Isolate isolate) async {
- var params = {'metricId': 'metrics/native/heap.old.used'};
+ var params = { 'metricId': 'metrics/native/heap.old.used' };
ServiceMetric counter =
- await isolate.invokeRpc('_getIsolateMetric', params);
+ await isolate.invokeRpc('_getIsolateMetric', params);
expect(counter.type, equals('Counter'));
expect(counter.name, equals('heap.old.used'));
},
+
(Isolate isolate) async {
bool caughtException;
try {
- await isolate.invokeRpc(
- '_getIsolateMetric', {'metricId': 'metrics/native/doesnotexist'});
- expect(false, isTrue, reason: 'Unreachable');
+ await isolate.invokeRpc('_getIsolateMetric',
+ { 'metricId': 'metrics/native/doesnotexist' });
+ expect(false, isTrue, reason:'Unreachable');
} on ServerRpcException catch (e) {
caughtException = true;
expect(e.code, equals(ServerRpcException.kInvalidParams));
- expect(
- e.message,
- "_getIsolateMetric: invalid 'metricId' "
- "parameter: metrics/native/doesnotexist");
+ expect(e.message,
+ "_getIsolateMetric: invalid 'metricId' "
+ "parameter: metrics/native/doesnotexist");
}
expect(caughtException, isTrue);
},
+
];
main(args) => runIsolateTests(args, tests, testeeBefore: script);

Powered by Google App Engine
This is Rietveld 408576698