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

Side by Side Diff: tests/standalone/typed_data_isolate_test.dart

Issue 53313007: Change dart:io Platform.script to return a URI. Change all uses of Platform.script to work with th… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix dom.py docs Created 7 years, 1 month 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 // Dart test program for testing typed data. 5 // Dart test program for testing typed data.
6 6
7 // Library tag to be able to run in html test framework. 7 // Library tag to be able to run in html test framework.
8 library TypedDataIsolateTest; 8 library TypedDataIsolateTest;
9 9
10 import 'dart:io'; 10 import 'dart:io';
11 import 'dart:isolate'; 11 import 'dart:isolate';
12 import 'package:async_helper/async_helper.dart'; 12 import 'package:async_helper/async_helper.dart';
13 13
14 second(message) { 14 second(message) {
15 var data = message[0]; 15 var data = message[0];
16 var replyTo = message[1]; 16 var replyTo = message[1];
17 print('got data'); 17 print('got data');
18 print(data); 18 print(data);
19 print('printed data'); 19 print('printed data');
20 replyTo.send('OK'); 20 replyTo.send('OK');
21 } 21 }
22 22
23 main() { 23 main() {
24 asyncStart(); 24 asyncStart();
25 new File(Platform.script).readAsBytes().then((List<int> data) { 25 new File(Platform.script.toFilePath()).readAsBytes().then((List<int> data) {
26 var response = new ReceivePort(); 26 var response = new ReceivePort();
27 var remote = Isolate.spawn(second, [data, response.sendPort]); 27 var remote = Isolate.spawn(second, [data, response.sendPort]);
28 response.first.then((reply) { 28 response.first.then((reply) {
29 print('got reply'); 29 print('got reply');
30 asyncEnd(); 30 asyncEnd();
31 }); 31 });
32 }); 32 });
33 } 33 }
34 34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698