| Index: dart/tests/html/js_interop_1_test.dart
|
| diff --git a/dart/tests/html/js_interop_1_test.dart b/dart/tests/html/js_interop_1_test.dart
|
| index a2d0aba91bb56894edb2b9d6fca50fb55adda205..e63322d065e9a12d3300fa9f3d513ebf24d5b073 100644
|
| --- a/dart/tests/html/js_interop_1_test.dart
|
| +++ b/dart/tests/html/js_interop_1_test.dart
|
| @@ -20,10 +20,14 @@ main() {
|
| var callback;
|
|
|
| test('js-to-dart-post-message', () {
|
| - callback = expectAsync1((e) {
|
| - Expect.equals('hello', e.data);
|
| + var onSuccess = expectAsync1((e) {
|
| window.on.message.remove(callback);
|
| });
|
| + callback = (e) {
|
| + if (e.data == 'hello') {
|
| + onSuccess(e);
|
| + }
|
| + };
|
| window.on.message.add(callback);
|
| injectSource("window.postMessage('hello', '*');");
|
| });
|
|
|