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

Side by Side Diff: tests/html/isolates_test.dart

Issue 11275054: Modified unittest to use new argument syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 #library('IsolatesTest'); 1 #library('IsolatesTest');
2 #import('../../pkg/unittest/unittest.dart'); 2 #import('../../pkg/unittest/unittest.dart');
3 #import('../../pkg/unittest/html_config.dart'); 3 #import('../../pkg/unittest/html_config.dart');
4 #import('dart:html'); 4 #import('dart:html');
5 #import('dart:json'); 5 #import('dart:json');
6 #import('dart:isolate', prefix:'isolate'); 6 #import('dart:isolate', prefix:'isolate');
7 7
8 String responseFor(message) => 'response for $message'; 8 String responseFor(message) => 'response for $message';
9 9
10 void isolateEntry() { 10 void isolateEntry() {
(...skipping 21 matching lines...) Expand all
32 test('IsolateSpawn', () { 32 test('IsolateSpawn', () {
33 isolate.spawnFunction(isolateEntry); 33 isolate.spawnFunction(isolateEntry);
34 }); 34 });
35 test('NonDOMIsolates', () { 35 test('NonDOMIsolates', () {
36 var callback = expectAsync0((){}); 36 var callback = expectAsync0((){});
37 var port = isolate.spawnFunction(isolateEntry); 37 var port = isolate.spawnFunction(isolateEntry);
38 final msg1 = 'foo'; 38 final msg1 = 'foo';
39 final msg2 = 'bar'; 39 final msg2 = 'bar';
40 port.call(msg1).then((response) { 40 port.call(msg1).then((response) {
41 guardAsync(() { 41 guardAsync(() {
42 Expect.equals(responseFor(msg1), response); 42 expect(response, equals(responseFor(msg1)));
43 port.call(msg2).then((response) { 43 port.call(msg2).then((response) {
44 guardAsync(() { 44 guardAsync(() {
45 Expect.equals(responseFor(msg2), response); 45 expect(response, equals(responseFor(msg2)));
46 callback(); 46 callback();
47 }); 47 });
48 }); 48 });
49 }); 49 });
50 }); 50 });
51 }); 51 });
52 } 52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698