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

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

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 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 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 deferred_in_isolate2_test; 5 library deferred_in_isolate2_test;
6 6
7 import 'dart:isolate'; 7 import 'dart:isolate';
8 import 'dart:async'; 8 import 'dart:async';
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
11 import 'deferred_in_isolate2_lib.dart' deferred as lib; 11 import 'deferred_in_isolate2_lib.dart' deferred as lib;
12 12
13 loadDeferred(port) { 13 loadDeferred(port) {
14 lib.loadLibrary().then((_) { 14 lib.loadLibrary().then((_) {
15 port.send(lib.f()); 15 port.send(lib.f());
16 }); 16 });
17 } 17 }
18 18
19 main() { 19 main() {
20 test("Deferred loading in isolate", () { 20 test("Deferred loading in isolate", () {
21 ReceivePort port = new ReceivePort(); 21 ReceivePort port = new ReceivePort();
22 port.first.then(expectAsync((msg) { 22 port.first.then(expectAsync((msg) {
23 expect(msg, equals("hi")); 23 expect(msg, equals("hi"));
24 })); 24 }));
25 Isolate.spawn(loadDeferred, port.sendPort); 25 Isolate.spawn(loadDeferred, port.sendPort);
26 }); 26 });
27 } 27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698