blob: 121d62f495f60da11475b0db4d4e70202fe07c85 [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library connectToLoader_apptests;
import 'dart:async';
import 'package:apptest/apptest.dart';
import 'package:mojom/mojo/url_response_disk_cache.mojom.dart';
import 'package:mojom/mojo/url_response.mojom.dart';
import 'package:mojo/application.dart';
import 'package:mojo/bindings.dart';
import 'package:mojo/core.dart';
connectToLoaderApptests(Application application, String url) {
test('Connection', () async {
var diskCacheProxy = new UrlResponseDiskCacheProxy.unbound();
application.connectToService("mojo:url_response_disk_cache",
diskCacheProxy);
var response = new UrlResponse();
response.url = 'http://www.example.com';
await diskCacheProxy.ptr.getFile(response);
await diskCacheProxy.close();
});
}