OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import 'dart:uri'; | 5 import 'dart:uri'; |
6 import 'parser_helper.dart'; | 6 import 'parser_helper.dart'; |
7 import 'mock_compiler.dart'; | 7 import 'mock_compiler.dart'; |
8 import '../../../lib/compiler/compiler.dart'; | 8 import '../../../lib/compiler/compiler.dart'; |
9 import '../../../lib/compiler/implementation/dart2jslib.dart' as leg; | 9 import '../../../lib/compiler/implementation/dart2jslib.dart' as leg; |
10 import '../../../lib/compiler/implementation/dart_backend/dart_backend.dart'; | 10 import '../../../lib/compiler/implementation/dart_backend/dart_backend.dart'; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 abstract class Window { | 46 abstract class Window { |
47 Navigator get navigator; | 47 Navigator get navigator; |
48 } | 48 } |
49 abstract class Navigator { | 49 abstract class Navigator { |
50 String get userAgent; | 50 String get userAgent; |
51 } | 51 } |
52 '''; | 52 '''; |
53 | 53 |
54 const helperLib = r''' | 54 const helperLib = r''' |
55 #library('js_helper'); | 55 #library('js_helper'); |
| 56 class JSInvocationMirror {} |
56 '''; | 57 '''; |
57 | 58 |
58 testDart2Dart(String src, {void continuation(String s), bool minify: false, | 59 testDart2Dart(String src, {void continuation(String s), bool minify: false, |
59 bool stripTypes: false}) { | 60 bool stripTypes: false}) { |
60 // If continuation is not provided, check that source string remains the same. | 61 // If continuation is not provided, check that source string remains the same. |
61 if (continuation === null) { | 62 if (continuation === null) { |
62 continuation = (s) { Expect.equals(src, s); }; | 63 continuation = (s) { Expect.equals(src, s); }; |
63 } | 64 } |
64 testDart2DartWithLibrary(src, '', continuation: continuation, minify: minify, | 65 testDart2DartWithLibrary(src, '', continuation: continuation, minify: minify, |
65 stripTypes: stripTypes); | 66 stripTypes: stripTypes); |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 testDoubleMains(); | 715 testDoubleMains(); |
715 testStaticAccessIoLib(); | 716 testStaticAccessIoLib(); |
716 testLocalFunctionPlaceholder(); | 717 testLocalFunctionPlaceholder(); |
717 testMinification(); | 718 testMinification(); |
718 testClosureLocalsMinified(); | 719 testClosureLocalsMinified(); |
719 testParametersMinified(); | 720 testParametersMinified(); |
720 testDeclarationTypePlaceholders(); | 721 testDeclarationTypePlaceholders(); |
721 testPlatformLibraryMemberNamesAreFixed(); | 722 testPlatformLibraryMemberNamesAreFixed(); |
722 testConflictsWithCoreLib(); | 723 testConflictsWithCoreLib(); |
723 } | 724 } |
OLD | NEW |