| Index: tests/html/js_test.dart
|
| diff --git a/tests/html/js_test.dart b/tests/html/js_test.dart
|
| index ba5d00746d811f6884f9020d031cb891e3ef9f9a..d05901fbf24f9df1f79b215621427bfc88988549 100644
|
| --- a/tests/html/js_test.dart
|
| +++ b/tests/html/js_test.dart
|
| @@ -659,6 +659,20 @@ main() {
|
| context.deleteProperty('callback');
|
| });
|
|
|
| + test('invoke Dart callback from JS in a Zone', () {
|
| + expect(() => context.callMethod('invokeCallback'), throws);
|
| +
|
| + var childZone = Zone.current.fork();
|
| + childZone.run(() {
|
| + context['callback'] = () {
|
| + expect(Zone.current, childZone);
|
| + };
|
| + });
|
| + context.callMethod('invokeCallback');
|
| +
|
| + context.deleteProperty('callback');
|
| + });
|
| +
|
| test('callback as parameter', () {
|
| expect(context.callMethod('getTypeOf', [context['razzle']]),
|
| equals("function"));
|
|
|