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

Side by Side Diff: pkg/scheduled_test/lib/scheduled_process.dart

Issue 25094002: Adapt streams for additional stackTrace argument. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove types in closures. Created 7 years, 2 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
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 scheduled_test.scheduled_process; 5 library scheduled_test.scheduled_process;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 }), "waiting to reach shouldExit() or kill() for process " 191 }), "waiting to reach shouldExit() or kill() for process "
192 "'$description'"); 192 "'$description'");
193 }); 193 });
194 } 194 }
195 195
196 /// Converts a stream of bytes to a stream of lines and returns that along 196 /// Converts a stream of bytes to a stream of lines and returns that along
197 /// with a [StreamCanceller] controlling it. 197 /// with a [StreamCanceller] controlling it.
198 Pair<Stream<String>, StreamCanceller> _lineStreamWithCanceller( 198 Pair<Stream<String>, StreamCanceller> _lineStreamWithCanceller(
199 Future<Stream<List<int>>> streamFuture) { 199 Future<Stream<List<int>>> streamFuture) {
200 return streamWithCanceller(futureStream(streamFuture) 200 return streamWithCanceller(futureStream(streamFuture)
201 .handleError((e) => currentSchedule.signalError(e)) 201 .handleError(currentSchedule.signalError)
202 .map((chunk) { 202 .map((chunk) {
203 // Whenever the process produces any sort of output, reset the schedule's 203 // Whenever the process produces any sort of output, reset the schedule's
204 // timer. 204 // timer.
205 currentSchedule.heartbeat(); 205 currentSchedule.heartbeat();
206 return chunk; 206 return chunk;
207 }) 207 })
208 .transform(_encoding.decoder) 208 .transform(_encoding.decoder)
209 .transform(new LineSplitter())); 209 .transform(new LineSplitter()));
210 } 210 }
211 211
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 schedule(() { 348 schedule(() {
349 _endExpected = true; 349 _endExpected = true;
350 return _exitCode.then((exitCode) { 350 return _exitCode.then((exitCode) {
351 if (expectedExitCode != null) { 351 if (expectedExitCode != null) {
352 expect(exitCode, equals(expectedExitCode)); 352 expect(exitCode, equals(expectedExitCode));
353 } 353 }
354 }); 354 });
355 }, "waiting for process '$description' to exit"); 355 }, "waiting for process '$description' to exit");
356 } 356 }
357 } 357 }
OLDNEW
« no previous file with comments | « pkg/mime/lib/src/mime_multipart_transformer.dart ('k') | pkg/scheduled_test/lib/scheduled_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698