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

Side by Side Diff: services/dart/dart_apptests/lib/src/connect_to_loader_apptests.dart

Issue 1276073004: Offline By Default (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Add missing explicits. Created 5 years, 3 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
« no previous file with comments | « services/dart/content_handler_main.cc ('k') | services/url_response_disk_cache/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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("mojo:url_response_disk_cache", 19 application.connectToService(
20 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.getFile(response); 23 await diskCacheProxy.ptr.updateAndGet(response);
24 await diskCacheProxy.close(); 24 await diskCacheProxy.close();
25 }); 25 });
26 } 26 }
OLDNEW
« no previous file with comments | « services/dart/content_handler_main.cc ('k') | services/url_response_disk_cache/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698