| Index: tests/html/js_test.dart
|
| diff --git a/tests/html/js_test.dart b/tests/html/js_test.dart
|
| index e120895321461d7ff9bdb9ef9283fbc9cd7c1afb..facf3cb2e27a79fcc54f5bb459e357bb933f887e 100644
|
| --- a/tests/html/js_test.dart
|
| +++ b/tests/html/js_test.dart
|
| @@ -201,6 +201,10 @@ class Color {
|
|
|
| class TestDartObject {}
|
|
|
| +class Callable {
|
| + call() => 'called';
|
| +}
|
| +
|
| main() {
|
| _injectJs();
|
| useHtmlConfiguration();
|
| @@ -460,7 +464,7 @@ main() {
|
|
|
| });
|
|
|
| - group('Dart callback', () {
|
| + group('Dart functions', () {
|
| test('invoke Dart callback from JS', () {
|
| expect(() => context.callMethod('invokeCallback'), throws);
|
|
|
| @@ -498,6 +502,13 @@ main() {
|
| expect(result, 42);
|
| });
|
|
|
| + test('emulated functions should be callable in JS', () {
|
| + context['callable'] = new Callable();
|
| + var result = context.callMethod('callable');
|
| + expect(result, 'called');
|
| + context.deleteProperty('callable');
|
| + });
|
| +
|
| });
|
|
|
| group('JsObject.jsify()', () {
|
|
|