Chromium Code Reviews| Index: runtime/observatory/tests/service/crash_dump_test.dart |
| diff --git a/runtime/observatory/tests/service/crash_dump_test.dart b/runtime/observatory/tests/service/crash_dump_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cae55739f38c066ac80961cb0350cd604b18ea5d |
| --- /dev/null |
| +++ b/runtime/observatory/tests/service/crash_dump_test.dart |
| @@ -0,0 +1,34 @@ |
| +// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +library crash_dump_test; |
| + |
| +import 'dart:async'; |
| +import 'dart:convert'; |
| +import 'dart:io'; |
| +import 'package:observatory/service_io.dart'; |
| + |
| +import 'test_helper.dart'; |
| + |
| +Future warmup() async { |
| + print('hi'); |
| +} |
| + |
| +var tests = [ |
| + (VM vm) async { |
| + HttpClient client = new HttpClient(); |
| + var request = |
| + await client.getUrl(Uri.parse('$serviceHttpAddress/_getCrashDump')); |
| + var response = await request.close(); |
| + Completer completer = new Completer(); |
| + String responseString = ''; |
|
rmacnak
2015/07/31 21:24:53
Large response, use a StringBuffer
Cutch
2015/07/31 21:37:44
Done.
|
| + response.transform(UTF8.decoder).listen((chunk) { |
| + responseString += chunk; |
| + }, onDone: () => completer.complete(responseString)); |
| + await completer.future; |
| + JSON.decode(responseString); |
| + } |
| +]; |
| + |
| +main(args) async => runVMTests(args, tests, testeeBefore:warmup); |