| Index: tests/dom/isolates_test.dart
|
| diff --git a/tests/dom/isolates_test.dart b/tests/dom/isolates_test.dart
|
| deleted file mode 100644
|
| index ff18d931213807f819bbfe08c3e0321fa52395eb..0000000000000000000000000000000000000000
|
| --- a/tests/dom/isolates_test.dart
|
| +++ /dev/null
|
| @@ -1,54 +0,0 @@
|
| -#library('IsolatesTest');
|
| -#import('../../lib/unittest/unittest.dart');
|
| -#import('../../lib/unittest/html_config.dart');
|
| -#import('dart:html');
|
| -#import('dart:json');
|
| -#import('dart:isolate', prefix:'isolate');
|
| -
|
| -class PingPongIsolate extends isolate.Isolate {
|
| - PingPongIsolate() : super.heavy();
|
| -
|
| - void main() {
|
| - bool wasThrown = false;
|
| - try {
|
| - window.alert('Test');
|
| - } catch(final e) {
|
| - wasThrown = true;
|
| - }
|
| - // If wasn't thrown, do not listen to messages to make test fail.
|
| - if (!wasThrown) {
|
| - return;
|
| - }
|
| -
|
| - // Check that JSON library was loaded to isolate.
|
| - JSON.stringify([1, 2, 3]);
|
| -
|
| - port.receive((message, replyTo) {
|
| - replyTo.send(responseFor(message), null);
|
| - });
|
| - }
|
| -
|
| - static String responseFor(message) => 'response for $message';
|
| -}
|
| -
|
| -main() {
|
| - useHtmlConfiguration();
|
| - asyncTest('IsolateSpawn', 1, () {
|
| - new PingPongIsolate().spawn().then((isolate.SendPort port) {
|
| - callbackDone();
|
| - });
|
| - });
|
| - asyncTest('NonDOMIsolates', 1, () {
|
| - new PingPongIsolate().spawn().then((isolate.SendPort port) {
|
| - final msg1 = 'foo';
|
| - final msg2 = 'bar';
|
| - port.call(msg1).then((response) {
|
| - Expect.equals(PingPongIsolate.responseFor(msg1), response);
|
| - port.call(msg2).then((response) {
|
| - Expect.equals(PingPongIsolate.responseFor(msg2), response);
|
| - callbackDone();
|
| - });
|
| - });
|
| - });
|
| - });
|
| -}
|
|
|