| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 library connectToLoader_apptests; | 5 library connectToLoader_apptests; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:mojo_apptest/apptest.dart'; | 9 import 'package:mojo_apptest/apptest.dart'; |
| 10 import 'package:mojo_services/mojo/url_response_disk_cache.mojom.dart'; | 10 import 'package:mojo_services/mojo/url_response_disk_cache.mojom.dart'; |
| 11 import 'package:mojo/mojo/url_response.mojom.dart'; | 11 import 'package:mojo/mojo/url_response.mojom.dart'; |
| 12 import 'package:mojo/application.dart'; | 12 import 'package:mojo/application.dart'; |
| 13 import 'package:mojo/bindings.dart'; | 13 import 'package:mojo/bindings.dart'; |
| 14 import 'package:mojo/core.dart'; | 14 import 'package:mojo/core.dart'; |
| 15 | 15 |
| 16 connectToLoaderApptests(Application application, String url) { | 16 connectToLoaderApptests(Application application, String url) { |
| 17 test('Connection', () async { | 17 test('Connection', () async { |
| 18 var diskCacheProxy = new UrlResponseDiskCacheProxy.unbound(); | 18 var diskCacheProxy = new UrlResponseDiskCacheProxy.unbound(); |
| 19 application.connectToService( | 19 application.connectToService( |
| 20 "mojo:url_response_disk_cache", diskCacheProxy); | 20 "mojo:url_response_disk_cache", diskCacheProxy); |
| 21 var response = new UrlResponse(); | 21 var response = new UrlResponse(); |
| 22 response.url = 'http://www.example.com'; | 22 response.url = 'http://www.example.com'; |
| 23 await diskCacheProxy.ptr.updateAndGet(response); | 23 await diskCacheProxy.updateAndGet(response); |
| 24 await diskCacheProxy.close(); | 24 await diskCacheProxy.close(); |
| 25 }); | 25 }); |
| 26 } | 26 } |
| OLD | NEW |