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 String buildLibrarySource( | 9 String buildLibrarySource( |
| 10 Map<String, String> elementMap, | 10 Map<String, String> elementMap, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 'String': 'class String implements Pattern {}', | 83 'String': 'class String implements Pattern {}', |
| 84 'Symbol': 'class Symbol { final name; const Symbol(this.name); }', | 84 'Symbol': 'class Symbol { final name; const Symbol(this.name); }', |
| 85 'Type': 'class Type {}', | 85 'Type': 'class Type {}', |
| 86 'Pattern': 'abstract class Pattern {}', | 86 'Pattern': 'abstract class Pattern {}', |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 const String DEFAULT_PATCH_CORE_SOURCE = r''' | 89 const String DEFAULT_PATCH_CORE_SOURCE = r''' |
| 90 import 'dart:_js_helper'; | 90 import 'dart:_js_helper'; |
| 91 import 'dart:_interceptors'; | 91 import 'dart:_interceptors'; |
| 92 import 'dart:_isolate_helper'; | 92 import 'dart:_isolate_helper'; |
| 93 import 'dart:async'; | |
| 93 '''; | 94 '''; |
| 94 | 95 |
| 95 const Map<String, String> DEFAULT_JS_HELPER_LIBRARY = const <String, String>{ | 96 const Map<String, String> DEFAULT_JS_HELPER_LIBRARY = const <String, String>{ |
| 96 'assertHelper': 'assertHelper(a) {}', | 97 'assertHelper': 'assertHelper(a) {}', |
| 97 'assertIsSubtype': 'assertIsSubtype(subtype, supertype, message) {}', | 98 'assertIsSubtype': 'assertIsSubtype(subtype, supertype, message) {}', |
| 98 'assertSubtype': 'assertSubtype(object, isField, checks, asField) {}', | 99 'assertSubtype': 'assertSubtype(object, isField, checks, asField) {}', |
| 99 'assertSubtypeOfRuntimeType': 'assertSubtypeOfRuntimeType(object, type) {}', | 100 'assertSubtypeOfRuntimeType': 'assertSubtypeOfRuntimeType(object, type) {}', |
| 100 'boolConversionCheck': 'boolConversionCheck(x) {}', | 101 'boolConversionCheck': 'boolConversionCheck(x) {}', |
| 101 'boolTypeCast': 'boolTypeCast(value) {}', | 102 'boolTypeCast': 'boolTypeCast(value) {}', |
| 102 'boolTypeCheck': 'boolTypeCheck(value) {}', | 103 'boolTypeCheck': 'boolTypeCheck(value) {}', |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 355 | 356 |
| 356 const Map<String, String> DEFAULT_ISOLATE_HELPER_LIBRARY = | 357 const Map<String, String> DEFAULT_ISOLATE_HELPER_LIBRARY = |
| 357 const <String, String>{ | 358 const <String, String>{ |
| 358 'startRootIsolate': 'void startRootIsolate(entry, args) {}', | 359 'startRootIsolate': 'void startRootIsolate(entry, args) {}', |
| 359 '_currentIsolate': 'var _currentIsolate;', | 360 '_currentIsolate': 'var _currentIsolate;', |
| 360 '_callInIsolate': 'var _callInIsolate;', | 361 '_callInIsolate': 'var _callInIsolate;', |
| 361 '_WorkerBase': 'class _WorkerBase {}', | 362 '_WorkerBase': 'class _WorkerBase {}', |
| 362 }; | 363 }; |
| 363 | 364 |
| 364 const Map<String, String> DEFAULT_ASYNC_LIBRARY = const <String, String>{ | 365 const Map<String, String> DEFAULT_ASYNC_LIBRARY = const <String, String>{ |
| 366 'DeferredLibrary': 'class DeferredLibrary {}', | |
|
floitsch
2015/02/03 13:34:21
?
I didn't even know that DeferredLibrary still ex
Johnni Winther
2015/02/03 14:12:56
I _is_ deprecated to be removed in 1.8...
Johnni Winther
2015/02/03 14:14:48
That should be 'It _is_' - and not 'I _am_' ;-)
| |
| 365 'Future': 'class Future<T> {}', | 367 'Future': 'class Future<T> {}', |
| 366 'Stream': 'class Stream<T> {}', | 368 'Stream': 'class Stream<T> {}', |
| 367 }; | 369 }; |
| 368 | 370 |
| 369 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ | 371 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ |
| 370 'Comment': 'class Comment {}', | 372 'Comment': 'class Comment {}', |
| 371 'MirrorSystem': 'class MirrorSystem {}', | 373 'MirrorSystem': 'class MirrorSystem {}', |
| 372 'MirrorsUsed': 'class MirrorsUsed {}', | 374 'MirrorsUsed': 'class MirrorsUsed {}', |
| 373 }; | 375 }; |
| OLD | NEW |