OLD | NEW |
(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 import 'dart:io'; |
| 6 import 'package:observatory/service_io.dart'; |
| 7 import 'package:unittest/unittest.dart'; |
| 8 |
| 9 import 'test_helper.dart'; |
| 10 |
| 11 var tests = [ |
| 12 (VM vm) async { |
| 13 // Simple heartbeat test to ensure we can fetch Observatory resources. |
| 14 var heartBeatUrl = |
| 15 serviceHttpAddress + '/third_party/trace_viewer_full.html'; |
| 16 print('Trying to fetch $heartBeatUrl'); |
| 17 HttpClient client = new HttpClient(); |
| 18 HttpClientRequest request = await client.getUrl(Uri.parse(heartBeatUrl)); |
| 19 HttpClientResponse response = await request.close(); |
| 20 expect(response.statusCode, 200); |
| 21 await response.drain(); |
| 22 } |
| 23 ]; |
| 24 |
| 25 main(args) async => runVMTests(args, tests); |
OLD | NEW |