Chromium Code Reviews| Index: tests/html/js_interop_2_test.dart |
| diff --git a/tests/html/js_interop_2_test.dart b/tests/html/js_interop_2_test.dart |
| index 0ea183d9d1ef7aae1f075c7fc80b4c8e286c77f2..37245b2348623bad5ef9be916b6cc6da288e99ce 100644 |
| --- a/tests/html/js_interop_2_test.dart |
| +++ b/tests/html/js_interop_2_test.dart |
| @@ -7,6 +7,7 @@ |
| #import('../../lib/unittest/html_config.dart'); |
| #import('dart:html'); |
| #import('dart:json'); |
|
vsm
2012/07/04 08:52:35
Can delete this now.
|
| +#import('dart:isolate'); |
| injectSource(code) { |
| final script = new ScriptElement(); |
| @@ -21,7 +22,8 @@ isolateTest = """ |
| return 'received'; |
| } |
| - var port = new ReceivePortSync(test); |
| + var port = new ReceivePortSync(); |
| + port.receive(test); |
| window.registerPort('test', port.toSendPort()); |
| """; |
| @@ -29,13 +31,13 @@ main() { |
| useHtmlConfiguration(); |
| test('isolateTest', () { |
| - injectSource(isolateTest); |
| + injectSource(isolateTest); |
| - var port = window.lookupPort('test'); |
| - var result = port.call('sent'); |
| - Expect.equals('received', result); |
| + SendPortSync port = window.lookupPort('test'); |
| + var result = port.callSync('sent'); |
| + Expect.equals('received', result); |
| - result = port.call('ignore'); |
| - Expect.isNull(result); |
| - }); |
| + result = port.callSync('ignore'); |
| + Expect.isNull(result); |
| + }); |
| } |