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

Side by Side Diff: pkg/barback/test/asset_test.dart

Issue 261823008: Reorganize barback's source files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: re-add barback/lib/src/internal_asset.dart Created 6 years, 7 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 barback.test.asset_test; 5 library barback.test.asset_test;
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 import 'dart:isolate'; 10 import 'dart:isolate';
11 11
12 import 'package:barback/barback.dart'; 12 import 'package:barback/barback.dart';
13 import 'package:barback/src/internal_asset.dart'; 13 import 'package:barback/src/asset/internal_asset.dart';
14 import 'package:path/path.dart' as pathos; 14 import 'package:path/path.dart' as pathos;
15 import 'package:unittest/unittest.dart'; 15 import 'package:unittest/unittest.dart';
16 16
17 import 'utils.dart'; 17 import 'utils.dart';
18 18
19 /// The contents of the test binary file. 19 /// The contents of the test binary file.
20 final binaryContents = [0, 1, 2, 3, 4]; 20 final binaryContents = [0, 1, 2, 3, 4];
21 21
22 main() { 22 main() {
23 initConfig(); 23 initConfig();
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 }); 259 });
260 }); 260 });
261 } 261 }
262 262
263 void _getAssetBytes(message) { 263 void _getAssetBytes(message) {
264 var asset = deserializeAsset(message['asset']); 264 var asset = deserializeAsset(message['asset']);
265 var builder = asset.read().fold(new BytesBuilder(), 265 var builder = asset.read().fold(new BytesBuilder(),
266 (builder, chunk) => builder..add(chunk)); 266 (builder, chunk) => builder..add(chunk));
267 builder.then((builder) => message['replyTo'].send(builder.takeBytes())); 267 builder.then((builder) => message['replyTo'].send(builder.takeBytes()));
268 } 268 }
OLDNEW
« no previous file with comments | « pkg/barback/lib/src/utils/stream_replayer.dart ('k') | pkg/barback/test/cancelable_future_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698