| 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 // SharedOptions=--experimental-trust-js-interop-type-annotations | 5 // SharedOptions=--experimental-trust-js-interop-type-annotations |
| 6 | 6 |
| 7 // Same test as js_typed_interop_anonymous2, but using the | 7 // Same test as js_typed_interop_anonymous2, but using the |
| 8 // --experimental-trust-js-interop-type-annotations flag. | 8 // --experimental-trust-js-interop-type-annotations flag. |
| 9 @JS() | 9 @JS() |
| 10 library js_typed_interop_anonymous2_exp_test; | 10 library js_typed_interop_anonymous2_exp_test; |
| 11 | 11 |
| 12 import 'dart:html'; | 12 import 'dart:html'; |
| 13 import 'dart:js' as js; | 13 import 'dart:js' as js; |
| 14 | 14 |
| 15 import 'package:js/js.dart'; | 15 import 'package:js/js.dart'; |
| 16 import 'package:minitest/minitest.dart'; | 16 import 'package:expect/minitest.dart'; |
| 17 | 17 |
| 18 @JS() @anonymous | 18 @JS() @anonymous |
| 19 class A { | 19 class A { |
| 20 external factory A({B b}); | 20 external factory A({B b}); |
| 21 | 21 |
| 22 external B get b; | 22 external B get b; |
| 23 } | 23 } |
| 24 | 24 |
| 25 @JS() @anonymous | 25 @JS() @anonymous |
| 26 class B { | 26 class B { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 | 42 |
| 43 main() { | 43 main() { |
| 44 test('simple', () { | 44 test('simple', () { |
| 45 var b = new B(); | 45 var b = new B(); |
| 46 var a = new A(b: b); | 46 var a = new A(b: b); |
| 47 expect(a.b, equals(b)); | 47 expect(a.b, equals(b)); |
| 48 expect(b.c, isNull); | 48 expect(b.c, isNull); |
| 49 }); | 49 }); |
| 50 } | 50 } |
| OLD | NEW |