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

Side by Side Diff: runtime/observatory/tests/service/crash_dump_test.dart

Issue 1266943005: Fix http requests and the crash dump RPC (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library crash_dump_test;
6
7 import 'dart:async';
8 import 'dart:convert';
9 import 'dart:io';
10 import 'package:observatory/service_io.dart';
11
12 import 'test_helper.dart';
13
14 Future warmup() async {
15 print('hi');
16 }
17
18 var tests = [
19 (VM vm) async {
20 HttpClient client = new HttpClient();
21 var request =
22 await client.getUrl(Uri.parse('$serviceHttpAddress/_getCrashDump'));
23 var response = await request.close();
24 Completer completer = new Completer();
25 StringBuffer sb = new StringBuffer();
26 response.transform(UTF8.decoder).listen((chunk) {
27 sb.write(chunk);
28 }, onDone: () => completer.complete(sb.toString()));
29 var responseString = await completer.future;
30 JSON.decode(responseString);
31 }
32 ];
33
34 main(args) async => runVMTests(args, tests, testeeBefore:warmup);
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/view_footer.html ('k') | runtime/observatory/tests/service/test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698