// 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.

import 'dart:io';
import 'package:observatory/service_io.dart';
import 'package:unittest/unittest.dart';

import 'test_helper.dart';

var tests = [
  (VM vm) async {
    // Simple heartbeat test to ensure we can fetch Observatory resources.
    var heartBeatUrl =
        serviceHttpAddress + '/third_party/trace_viewer_full.html';
    print('Trying to fetch $heartBeatUrl');
    HttpClient client = new HttpClient();
    HttpClientRequest request = await client.getUrl(Uri.parse(heartBeatUrl));
    HttpClientResponse response = await request.close();
    expect(response.statusCode, 200);
    await response.drain();
  }
];

main(args) async => runVMTests(args, tests);

Test that we can load Observatory frontend resources
Test that we can load Observatory frontend resources

BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/1529153003 .
