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

Side by Side Diff: tests/isolate/deferred_in_isolate2_test.dart

Issue 1140553003: Cosmetic changes to deferred_in_isolate2_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « tests/isolate/deferred_in_isolate2_lib.dart ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file
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.
4
5 library deferred_in_isolate2_test;
6
1 import 'dart:isolate'; 7 import 'dart:isolate';
2 import 'dart:async'; 8 import 'dart:async';
3 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
4 10
5 import 'deferred_in_isolate2_lib.dart' deferred as lib; 11 import 'deferred_in_isolate2_lib.dart' deferred as lib;
6 12
7 loadDeferred(port) { 13 loadDeferred(port) {
8 lib.loadLibrary().then((_) { 14 lib.loadLibrary().then((_) {
9 port.send(lib.f()); 15 port.send(lib.f());
10 }); 16 });
11 } 17 }
12 18
13 main() { 19 main() {
14 test("Deferred loading in isolate", () { 20 test("Deferred loading in isolate", () {
15 ReceivePort port = new ReceivePort(); 21 ReceivePort port = new ReceivePort();
16 port.first.then(expectAsync((msg) { 22 port.first.then(expectAsync((msg) {
17 expect(msg, equals("hi")); 23 expect(msg, equals("hi"));
18 })); 24 }));
19 Isolate.spawn(loadDeferred, port.sendPort); 25 Isolate.spawn(loadDeferred, port.sendPort);
20 }); 26 });
21 } 27 }
OLDNEW
« no previous file with comments | « tests/isolate/deferred_in_isolate2_lib.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698