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

Unified Diff: runtime/observatory/tests/service/echo_test.dart

Issue 2759973004: Fix observatory tests broken by running dartfmt. Temporarily reverted formatting for evaluate_activ… (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/echo_test.dart
diff --git a/runtime/observatory/tests/service/echo_test.dart b/runtime/observatory/tests/service/echo_test.dart
index 64399dec9cd112c252bd550954ecae99c8d80c12..d86b1f2c377d139b8c22e0f8b12019067e8ac3a4 100644
--- a/runtime/observatory/tests/service/echo_test.dart
+++ b/runtime/observatory/tests/service/echo_test.dart
@@ -9,37 +9,33 @@ import 'package:unittest/unittest.dart';
import 'test_helper.dart';
var tests = [
-
-(Isolate isolate) =>
- isolate.vm.invokeRpc('_echo', { 'text': 'hello'}).then((result) {
- expect(result['type'], equals('_EchoResponse'));
- expect(result['text'], equals('hello'));
- }),
-
-(Isolate isolate) =>
- isolate.invokeRpc('_echo', { 'text': 'hello'}).then((result) {
- expect(result['type'], equals('_EchoResponse'));
- expect(result['text'], equals('hello'));
- }),
-
-(Isolate isolate) async {
- Completer completer = new Completer();
- var stream = await isolate.vm.getEventStream('_Echo');
- var subscription;
- subscription = stream.listen((ServiceEvent event) {
- assert(event.kind == '_Echo');
- expect(event.data.lengthInBytes, equals(3));
- expect(event.data.getUint8(0), equals(0));
- expect(event.data.getUint8(1), equals(128));
- expect(event.data.getUint8(2), equals(255));
- subscription.cancel();
- completer.complete();
- });
-
- await isolate.invokeRpc('_triggerEchoEvent', { 'text': 'hello' });
- await completer.future;
-},
-
+ (Isolate isolate) =>
+ isolate.vm.invokeRpc('_echo', {'text': 'hello'}).then((result) {
+ expect(result['type'], equals('_EchoResponse'));
+ expect(result['text'], equals('hello'));
+ }),
+ (Isolate isolate) =>
+ isolate.invokeRpc('_echo', {'text': 'hello'}).then((result) {
+ expect(result['type'], equals('_EchoResponse'));
+ expect(result['text'], equals('hello'));
+ }),
+ (Isolate isolate) async {
+ Completer completer = new Completer();
+ var stream = await isolate.vm.getEventStream('_Echo');
+ var subscription;
+ subscription = stream.listen((ServiceEvent event) {
+ assert(event.kind == '_Echo');
+ expect(event.data.lengthInBytes, equals(3));
+ expect(event.data.getUint8(0), equals(0));
+ expect(event.data.getUint8(1), equals(128));
+ expect(event.data.getUint8(2), equals(255));
+ subscription.cancel();
+ completer.complete();
+ });
+
+ await isolate.invokeRpc('_triggerEchoEvent', {'text': 'hello'});
+ await completer.future;
+ },
];
main(args) => runIsolateTests(args, tests);

Powered by Google App Engine
This is Rietveld 408576698