| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 @JS() |
| 5 library tests.html.mirrors_js_typed_interop_test; | 6 library tests.html.mirrors_js_typed_interop_test; |
| 6 | 7 |
| 7 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
| 8 import 'dart:html'; | 9 import 'dart:html'; |
| 9 | 10 |
| 10 import 'package:js/js.dart'; | 11 import 'package:js/js.dart'; |
| 11 import 'package:unittest/unittest.dart'; | 12 import 'package:unittest/unittest.dart'; |
| 12 import 'package:unittest/html_config.dart'; | 13 import 'package:unittest/html_config.dart'; |
| 13 | 14 |
| 14 _injectJs() { | 15 _injectJs() { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 39 useHtmlConfiguration(); | 40 useHtmlConfiguration(); |
| 40 | 41 |
| 41 test('dynamic dispatch', () { | 42 test('dynamic dispatch', () { |
| 42 var f = foo; | 43 var f = foo; |
| 43 expect(f.x, 3); | 44 expect(f.x, 3); |
| 44 // JsInterop methods are not accessible using reflection. | 45 // JsInterop methods are not accessible using reflection. |
| 45 expect(() => reflect(f).setField(#x, 123), throws); | 46 expect(() => reflect(f).setField(#x, 123), throws); |
| 46 expect(f.x, 3); | 47 expect(f.x, 3); |
| 47 }); | 48 }); |
| 48 } | 49 } |
| OLD | NEW |