Chromium Code Reviews| 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 // Library for creating mock versions of platform and internal libraries. | 5 // Library for creating mock versions of platform and internal libraries. |
| 6 | 6 |
| 7 library mock_libraries; | 7 library mock_libraries; |
| 8 | 8 |
| 9 const DEFAULT_PLATFORM_CONFIG = """ | |
| 10 [libraries] | |
|
Johnni Winther
2015/10/30 10:38:39
Shouldn't this be empty for the MockCompiler?
sigurdm
2015/10/30 11:38:27
No - but most of the lines are not needed.
Done.
| |
| 11 async:async/async.dart | |
| 12 _chrome:_chrome/dart2js/chrome_dart2js.dart | |
| 13 collection:collection/collection.dart | |
| 14 convert:convert/convert.dart | |
| 15 core:core/core.dart | |
| 16 developer:developer/developer.dart | |
| 17 html:html/dart2js/html_dart2js.dart | |
| 18 html_common:html/html_common/html_common_dart2js.dart | |
| 19 indexed_db:indexed_db/dart2js/indexed_db_dart2js.dart | |
| 20 io:unsupported:blah | |
| 21 isolate:isolate/isolate.dart | |
| 22 js:js/dart2js/js_dart2js.dart | |
| 23 math:math/math.dart | |
| 24 mirrors:mirrors/mirrors.dart | |
| 25 nativewrappers:html/dart2js/nativewrappers.dart | |
| 26 typed_data:typed_data/typed_data.dart | |
| 27 _native_typed_data:_internal/js_runtime/lib/native_typed_data.dart | |
| 28 svg:svg/dart2js/svg_dart2js.dart | |
| 29 web_audio:web_audio/dart2js/web_audio_dart2js.dart | |
| 30 web_gl:web_gl/dart2js/web_gl_dart2js.dart | |
| 31 web_sql:web_sql/dart2js/web_sql_dart2js.dart | |
| 32 _internal:internal/internal.dart | |
| 33 _js_helper:_internal/js_runtime/lib/js_helper.dart | |
| 34 _interceptors:_internal/js_runtime/lib/interceptors.dart | |
| 35 _foreign_helper:_internal/js_runtime/lib/foreign_helper.dart | |
| 36 _isolate_helper:_internal/js_runtime/lib/isolate_helper.dart | |
| 37 _js_mirrors:_internal/js_runtime/lib/js_mirrors.dart | |
| 38 _js_names:_internal/js_runtime/lib/js_names.dart | |
| 39 _js_primitives:_internal/js_runtime/lib/js_primitives.dart | |
| 40 _mirror_helper:_internal/js_runtime/lib/mirror_helper.dart | |
| 41 _js_embedded_names:_internal/js_runtime/lib/shared/embedded_names.dart | |
| 42 _async_await_error_codes:_internal/js_runtime/lib/shared/async_await_error_codes .dart | |
| 43 _metadata:html/html_common/metadata.dart | |
| 44 """; | |
| 45 | |
| 9 String buildLibrarySource( | 46 String buildLibrarySource( |
| 10 Map<String, String> elementMap, | 47 Map<String, String> elementMap, |
| 11 [Map<String, String> additionalElementMap = const <String, String>{}]) { | 48 [Map<String, String> additionalElementMap = const <String, String>{}]) { |
| 12 Map<String, String> map = new Map<String, String>.from(elementMap); | 49 Map<String, String> map = new Map<String, String>.from(elementMap); |
| 13 if (additionalElementMap != null) { | 50 if (additionalElementMap != null) { |
| 14 map.addAll(additionalElementMap); | 51 map.addAll(additionalElementMap); |
| 15 } | 52 } |
| 16 StringBuffer sb = new StringBuffer(); | 53 StringBuffer sb = new StringBuffer(); |
| 17 map.values.forEach((String element) { | 54 map.values.forEach((String element) { |
| 18 sb.write('$element\n'); | 55 sb.write('$element\n'); |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 447 | 484 |
| 448 const LookupMap(this._entries, [this._nestedMaps = const []]) | 485 const LookupMap(this._entries, [this._nestedMaps = const []]) |
| 449 : _key = null, _value = null; | 486 : _key = null, _value = null; |
| 450 | 487 |
| 451 const LookupMap.pair(this._key, this._value) | 488 const LookupMap.pair(this._key, this._value) |
| 452 : _entries = const [], _nestedMaps = const []; | 489 : _entries = const [], _nestedMaps = const []; |
| 453 V operator[](K k) => null; | 490 V operator[](K k) => null; |
| 454 }''', | 491 }''', |
| 455 '_version': 'const _version = "0.0.1+1";', | 492 '_version': 'const _version = "0.0.1+1";', |
| 456 }; | 493 }; |
| OLD | NEW |