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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // the class. | 162 // the class. |
163 external get _a; | 163 external get _a; |
164 } | 164 } |
165 | 165 |
166 @JS() | 166 @JS() |
167 external String get JS$JS$hasJsInName; | 167 external String get JS$JS$hasJsInName; |
168 | 168 |
169 @JS() | 169 @JS() |
170 external int JS$JS$hasJsInNameMethod(int x); | 170 external int JS$JS$hasJsInNameMethod(int x); |
171 | 171 |
172 // This is the prefered way to handle static or top level members that start | 172 // This is the preferred way to handle static or top level members that start |
173 // with JS$. We verify that JS$JS$ works purely to prevent bugs. | 173 // with JS$. We verify that JS$JS$ works purely to prevent bugs. |
174 @JS(r'JS$hasJsInName') | 174 @JS(r'JS$hasJsInName') |
175 external String get JS$hasJsInName; | 175 external String get JS$hasJsInName; |
176 | 176 |
177 @JS(r'JS$hasJsInNameMethod') | 177 @JS(r'JS$hasJsInNameMethod') |
178 external int JS$hasJsInNameMethod(int x); | 178 external int JS$hasJsInNameMethod(int x); |
179 | 179 |
180 @JS() | 180 @JS() |
181 class JS$JS$ClassWithJSInName { | 181 class JS$JS$ClassWithJSInName { |
182 external JS$JS$ClassWithJSInName(x); | 182 external JS$JS$ClassWithJSInName(x); |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 group('html', () { | 574 group('html', () { |
575 test('return html type', () { | 575 test('return html type', () { |
576 expect(getCanvasContext() is CanvasRenderingContext2D, isTrue); | 576 expect(getCanvasContext() is CanvasRenderingContext2D, isTrue); |
577 }); | 577 }); |
578 test('js path contains html types', () { | 578 test('js path contains html types', () { |
579 expect(propertyOnWindow, equals(42)); | 579 expect(propertyOnWindow, equals(42)); |
580 expect(propertyOnDocument, equals(45)); | 580 expect(propertyOnDocument, equals(45)); |
581 }); | 581 }); |
582 }); | 582 }); |
583 } | 583 } |
OLD | NEW |