| Index: tests/html/dom_isolates_test.dart
|
| diff --git a/tests/html/dom_isolates_test.dart b/tests/html/dom_isolates_test.dart
|
| index b630f757c39542b8f4ffce524600b7c2642dbfc4..ed36360ef066c0b5cce7d4adda7953ebfc305f9b 100644
|
| --- a/tests/html/dom_isolates_test.dart
|
| +++ b/tests/html/dom_isolates_test.dart
|
| @@ -19,11 +19,13 @@ isolateMain() {
|
| }
|
|
|
| isolateMainTrampoline() {
|
| - final childPort = spawnDomFunction(isolateMain);
|
| + final future = spawnDomFunction(isolateMain);
|
| port.receive((msg, parentPort) {
|
| - childPort.call(msg).then((response) {
|
| - parentPort.send(response);
|
| - port.close();
|
| + future.then((childPort) {
|
| + childPort.call(msg).then((response) {
|
| + parentPort.send(response);
|
| + port.close();
|
| + });
|
| });
|
| });
|
| }
|
| @@ -34,17 +36,21 @@ main() {
|
| useHtmlConfiguration();
|
|
|
| test('Simple DOM isolate test', () {
|
| - spawnDomFunction(isolateMain).call('check').then(
|
| - expectAsync1((msg) {
|
| - expect(msg, equals('${window.location}'));
|
| - }));
|
| + spawnDomFunction(isolateMain).then((sendPort) {
|
| + sendPort.call('check').then(
|
| + expectAsync1((msg) {
|
| + expect(msg, equals('${window.location}'));
|
| + }));
|
| + });
|
| });
|
|
|
| test('Nested DOM isolates test', () {
|
| - spawnDomFunction(isolateMainTrampoline).call('check').then(
|
| - expectAsync1((msg) {
|
| - expect(msg, equals('${window.location}'));
|
| - }));
|
| + spawnDomFunction(isolateMainTrampoline).then((sendPort) {
|
| + sendPort.call('check').then(
|
| + expectAsync1((msg) {
|
| + expect(msg, equals('${window.location}'));
|
| + }));
|
| + });
|
| });
|
|
|
| test('Not function', () {
|
|
|