| 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 {} | |
| 57 '''; | 56 '''; |
| 58 | 57 |
| 59 testDart2Dart(String src, {void continuation(String s), bool minify: false, | 58 testDart2Dart(String src, {void continuation(String s), bool minify: false, |
| 60 bool stripTypes: false}) { | 59 bool stripTypes: false}) { |
| 61 // If continuation is not provided, check that source string remains the same. | 60 // If continuation is not provided, check that source string remains the same. |
| 62 if (continuation === null) { | 61 if (continuation === null) { |
| 63 continuation = (s) { Expect.equals(src, s); }; | 62 continuation = (s) { Expect.equals(src, s); }; |
| 64 } | 63 } |
| 65 testDart2DartWithLibrary(src, '', continuation: continuation, minify: minify, | 64 testDart2DartWithLibrary(src, '', continuation: continuation, minify: minify, |
| 66 stripTypes: stripTypes); | 65 stripTypes: stripTypes); |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 testStaticAccessIoLib(); | 826 testStaticAccessIoLib(); |
| 828 testLocalFunctionPlaceholder(); | 827 testLocalFunctionPlaceholder(); |
| 829 testMinification(); | 828 testMinification(); |
| 830 testClosureLocalsMinified(); | 829 testClosureLocalsMinified(); |
| 831 testParametersMinified(); | 830 testParametersMinified(); |
| 832 testTypeVariablesInDifferentLibraries(); | 831 testTypeVariablesInDifferentLibraries(); |
| 833 testDeclarationTypePlaceholders(); | 832 testDeclarationTypePlaceholders(); |
| 834 testPlatformLibraryMemberNamesAreFixed(); | 833 testPlatformLibraryMemberNamesAreFixed(); |
| 835 testConflictsWithCoreLib(); | 834 testConflictsWithCoreLib(); |
| 836 } | 835 } |
| OLD | NEW |