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

Side by Side Diff: pkg/scheduled_test/test/descriptor_test.dart

Issue 12879015: Provisionally stop working around issues 9252 and 9253. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « pkg/http/test/utils.dart ('k') | pkg/scheduled_test/test/scheduled_process_test.dart » ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library descriptor_test; 5 library descriptor_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import '../../../pkg/pathos/lib/path.dart' as path; 10 import '../../../pkg/pathos/lib/path.dart' as path;
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 sandbox = dir.path; 951 sandbox = dir.path;
952 d.defaultRoot = sandbox; 952 d.defaultRoot = sandbox;
953 }); 953 });
954 }); 954 });
955 955
956 currentSchedule.onComplete.schedule(() { 956 currentSchedule.onComplete.schedule(() {
957 d.defaultRoot = null; 957 d.defaultRoot = null;
958 if (sandbox == null) return; 958 if (sandbox == null) return;
959 var oldSandbox = sandbox; 959 var oldSandbox = sandbox;
960 sandbox = null; 960 sandbox = null;
961 return deleteDir(oldSandbox); 961 return new Directory(oldSandbox).delete(recursive: true);
962 }); 962 });
963 } 963 }
964 964
965 Future<List<int>> byteStreamToList(Stream<List<int>> stream) { 965 Future<List<int>> byteStreamToList(Stream<List<int>> stream) {
966 return stream.reduce(<int>[], (buffer, chunk) { 966 return stream.reduce(<int>[], (buffer, chunk) {
967 buffer.addAll(chunk); 967 buffer.addAll(chunk);
968 return buffer; 968 return buffer;
969 }); 969 });
970 } 970 }
971 971
972 Future<String> byteStreamToString(Stream<List<int>> stream) => 972 Future<String> byteStreamToString(Stream<List<int>> stream) =>
973 byteStreamToList(stream).then((bytes) => new String.fromCharCodes(bytes)); 973 byteStreamToList(stream).then((bytes) => new String.fromCharCodes(bytes));
OLDNEW
« no previous file with comments | « pkg/http/test/utils.dart ('k') | pkg/scheduled_test/test/scheduled_process_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698