| 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 @JS() |
| 6 library js_typed_interop_test; | 6 library js_typed_interop_test; |
| 7 | 7 |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 | 9 |
| 10 import 'package:js/js.dart'; | 10 import 'package:js/js.dart'; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 external set x(int v); | 107 external set x(int v); |
| 108 external num multiplyByX(num y); | 108 external num multiplyByX(num y); |
| 109 external num multiplyBy2(num y); | 109 external num multiplyBy2(num y); |
| 110 external callClosureWithArgAndThis(Function closure, arg); | 110 external callClosureWithArgAndThis(Function closure, arg); |
| 111 external callClosureWithArg1(Function closure, arg1); | 111 external callClosureWithArg1(Function closure, arg1); |
| 112 external callClosureWithArg2(Function closure, arg1, arg2); | 112 external callClosureWithArg2(Function closure, arg1, arg2); |
| 113 external Bar getBar(); | 113 external Bar getBar(); |
| 114 external static int multiplyDefault2(int a, [int b]); | 114 external static int multiplyDefault2(int a, [int b]); |
| 115 } | 115 } |
| 116 | 116 |
| 117 @anonymous |
| 117 @JS() | 118 @JS() |
| 118 class ExampleLiteral { | 119 class ExampleLiteral { |
| 119 external factory ExampleLiteral({int x, String y, num z}); | 120 external factory ExampleLiteral({int x, String y, num z}); |
| 120 | 121 |
| 121 external int get x; | 122 external int get x; |
| 122 external String get y; | 123 external String get y; |
| 123 external num get z; | 124 external num get z; |
| 124 } | 125 } |
| 125 | 126 |
| 126 @JS('Foob') | 127 @JS('Foob') |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 // We do know at runtime whether something is a JsArray or not. | 333 // We do know at runtime whether something is a JsArray or not. |
| 333 expect(foo is List, isFalse); | 334 expect(foo is List, isFalse); |
| 334 }); | 335 }); |
| 335 | 336 |
| 336 test('dart interfaces', () { | 337 test('dart interfaces', () { |
| 337 expect(foo is Function, isFalse); | 338 expect(foo is Function, isFalse); |
| 338 expect(selection is List, isTrue); | 339 expect(selection is List, isTrue); |
| 339 }); | 340 }); |
| 340 }); | 341 }); |
| 341 } | 342 } |
| OLD | NEW |