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

Side by Side Diff: client/tests/client/dom/IsolatesTest.dart

Issue 9422019: isolates refactor: this change introduces 'dart:isolate' as a library. This is a (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 8 years, 10 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 #library('IsolatesTest'); 1 #library('IsolatesTest');
2 #import('../../../testing/unittest/unittest.dart'); 2 #import('../../../testing/unittest/unittest.dart');
3 #import('dart:dom'); 3 #import('dart:dom');
4 #import('dart:json'); 4 #import('dart:json');
5 #import('dart:isolate');
5 6
6 class PingPongIsolate extends Isolate { 7 class PingPongIsolate extends Isolate {
7 PingPongIsolate() : super.heavy(); 8 PingPongIsolate() : super.heavy();
8 9
9 void main() { 10 void main() {
10 bool wasThrown = false; 11 bool wasThrown = false;
11 try { 12 try {
12 window.alert('Test'); 13 window.alert('Test');
13 } catch(final e) { 14 } catch(final e) {
14 wasThrown = true; 15 wasThrown = true;
(...skipping 28 matching lines...) Expand all
43 port.call(msg1).receive((response, _) { 44 port.call(msg1).receive((response, _) {
44 Expect.equals(PingPongIsolate.responseFor(msg1), response); 45 Expect.equals(PingPongIsolate.responseFor(msg1), response);
45 port.call(msg2).receive((response, _) { 46 port.call(msg2).receive((response, _) {
46 Expect.equals(PingPongIsolate.responseFor(msg2), response); 47 Expect.equals(PingPongIsolate.responseFor(msg2), response);
47 callbackDone(); 48 callbackDone();
48 }); 49 });
49 }); 50 });
50 }); 51 });
51 }); 52 });
52 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698