Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: tests/utils/dummy_compiler_test.dart

Issue 1408253006: Introduce "platform configurations" to replace categories and libraries.dart. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix create_sdk scripts according to review Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/compiler/dart2js/platform_consistency_test.dart ('k') | tools/create_sdk.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // VMOptions= 4 // VMOptions=
5 // VMOptions=--print-object-histogram 5 // VMOptions=--print-object-histogram
6 6
7 // Smoke test of the dart2js compiler API. 7 // Smoke test of the dart2js compiler API.
8 library dummy_compiler; 8 library dummy_compiler;
9 9
10 import 'dart:async'; 10 import 'dart:async';
11 import "package:async_helper/async_helper.dart"; 11 import "package:async_helper/async_helper.dart";
12 12
13 import 'package:compiler/compiler.dart'; 13 import 'package:compiler/compiler.dart';
14 14
15 import '../compiler/dart2js/mock_libraries.dart'; 15 import '../compiler/dart2js/mock_libraries.dart';
16 16
17 String libProvider(Uri uri) { 17 String libProvider(Uri uri) {
18 if (uri.path.endsWith("/core.dart")) { 18 if (uri.path.endsWith(".platform")) {
19 return DEFAULT_PLATFORM_CONFIG;
20 } if (uri.path.endsWith("/core.dart")) {
19 return buildLibrarySource(DEFAULT_CORE_LIBRARY); 21 return buildLibrarySource(DEFAULT_CORE_LIBRARY);
20 } else if (uri.path.endsWith('core_patch.dart')) { 22 } else if (uri.path.endsWith('core_patch.dart')) {
21 return DEFAULT_PATCH_CORE_SOURCE; 23 return DEFAULT_PATCH_CORE_SOURCE;
22 } else if (uri.path.endsWith('interceptors.dart')) { 24 } else if (uri.path.endsWith('interceptors.dart')) {
23 return buildLibrarySource(DEFAULT_INTERCEPTORS_LIBRARY); 25 return buildLibrarySource(DEFAULT_INTERCEPTORS_LIBRARY);
24 } else if (uri.path.endsWith('js_helper.dart')) { 26 } else if (uri.path.endsWith('js_helper.dart')) {
25 return buildLibrarySource(DEFAULT_JS_HELPER_LIBRARY); 27 return buildLibrarySource(DEFAULT_JS_HELPER_LIBRARY);
26 } else if (uri.path.endsWith('isolate_helper.dart')) { 28 } else if (uri.path.endsWith('isolate_helper.dart')) {
27 return buildLibrarySource(DEFAULT_ISOLATE_HELPER_LIBRARY); 29 return buildLibrarySource(DEFAULT_ISOLATE_HELPER_LIBRARY);
28 } else if (uri.path.endsWith('/async.dart')) { 30 } else if (uri.path.endsWith('/async.dart')) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 new Uri(scheme: 'package', path: '/'), 62 new Uri(scheme: 'package', path: '/'),
61 provider, handler); 63 provider, handler);
62 result.then((CompilationResult result) { 64 result.then((CompilationResult result) {
63 if (!result.isSuccess) { 65 if (!result.isSuccess) {
64 throw 'Compilation failed'; 66 throw 'Compilation failed';
65 } 67 }
66 }, onError: (e, s) { 68 }, onError: (e, s) {
67 throw 'Compilation failed: $e\n$s'; 69 throw 'Compilation failed: $e\n$s';
68 }).then(asyncSuccess); 70 }).then(asyncSuccess);
69 } 71 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/platform_consistency_test.dart ('k') | tools/create_sdk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698