OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 /// Check that relative URIs are resolved against the canonical name of a | 5 /// Check that relative URIs are resolved against the canonical name of a |
6 /// library. This only matters for dart:-libraries, so this test mocks up two | 6 /// library. This only matters for dart:-libraries, so this test mocks up two |
7 /// dart:-libraries. | 7 /// dart:-libraries. |
8 | 8 |
9 import "dart:io"; | 9 import "dart:io"; |
10 | 10 |
11 import "dart:async"; | 11 import "dart:async"; |
12 | 12 |
13 import "memory_source_file_helper.dart"; | 13 import "memory_source_file_helper.dart"; |
14 | 14 |
15 import "package:async_helper/async_helper.dart"; | 15 import "package:async_helper/async_helper.dart"; |
16 | 16 |
17 import 'package:expect/expect.dart' show | 17 import 'package:expect/expect.dart' show |
18 Expect; | 18 Expect; |
19 | 19 |
20 import 'package:compiler/src/elements/elements.dart' show | 20 import 'package:compiler/src/elements/elements.dart' show |
21 LibraryElement; | 21 LibraryElement; |
22 | 22 |
23 import 'package:compiler/src/dart2jslib.dart' show | 23 import 'package:compiler/src/dart2jslib.dart' show |
24 MessageKind, | 24 MessageKind, |
25 NullSink; | 25 NullSink; |
26 | 26 |
27 import 'package:_internal/libraries.dart' show | 27 import 'package:sdk_library_metadata/libraries.dart' show |
28 DART2JS_PLATFORM, | 28 DART2JS_PLATFORM, |
29 LibraryInfo; | 29 LibraryInfo; |
30 | 30 |
31 const LibraryInfo mock1LibraryInfo = const LibraryInfo( | 31 const LibraryInfo mock1LibraryInfo = const LibraryInfo( |
32 "mock1.dart", | 32 "mock1.dart", |
33 category: "Shared", | 33 category: "Shared", |
34 documented: false, | 34 documented: false, |
35 platforms: DART2JS_PLATFORM); | 35 platforms: DART2JS_PLATFORM); |
36 | 36 |
37 const LibraryInfo mock2LibraryInfo = const LibraryInfo( | 37 const LibraryInfo mock2LibraryInfo = const LibraryInfo( |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 asyncStart(); | 122 asyncStart(); |
123 compiler.libraryLoader.loadLibrary(Uri.parse("dart:m_o_c_k_1")) | 123 compiler.libraryLoader.loadLibrary(Uri.parse("dart:m_o_c_k_1")) |
124 .then(checkLibrary) | 124 .then(checkLibrary) |
125 .then(asyncSuccess); | 125 .then(asyncSuccess); |
126 } | 126 } |
127 | 127 |
128 const Map MEMORY_SOURCE_FILES = const { | 128 const Map MEMORY_SOURCE_FILES = const { |
129 "mock1.dart": "library mock1; import 'mock2.dart';", | 129 "mock1.dart": "library mock1; import 'mock2.dart';", |
130 "mock2.dart": "library mock2;", | 130 "mock2.dart": "library mock2;", |
131 }; | 131 }; |
OLD | NEW |