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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 split(pattern) => []; | 374 split(pattern) => []; |
375 int get length => 42; | 375 int get length => 42; |
376 operator[](index) {} | 376 operator[](index) {} |
377 toString() {} | 377 toString() {} |
378 operator+(other) => this; | 378 operator+(other) => this; |
379 codeUnitAt(index) => 42; | 379 codeUnitAt(index) => 42; |
380 }''', | 380 }''', |
381 'JSUInt31': 'class JSUInt31 extends JSUInt32 {}', | 381 'JSUInt31': 'class JSUInt31 extends JSUInt32 {}', |
382 'JSUInt32': 'class JSUInt32 extends JSPositiveInt {}', | 382 'JSUInt32': 'class JSUInt32 extends JSPositiveInt {}', |
383 'ObjectInterceptor': 'class ObjectInterceptor {}', | 383 'ObjectInterceptor': 'class ObjectInterceptor {}', |
| 384 'JavaScriptObject': 'class JavaScriptObject {}', |
384 'PlainJavaScriptObject': 'class PlainJavaScriptObject {}', | 385 'PlainJavaScriptObject': 'class PlainJavaScriptObject {}', |
385 'UnknownJavaScriptObject': 'class UnknownJavaScriptObject {}', | 386 'UnknownJavaScriptObject': 'class UnknownJavaScriptObject {}', |
| 387 'JavaScriptFunction': 'class JavaScriptFunction {}', |
386 }; | 388 }; |
387 | 389 |
388 const Map<String, String> DEFAULT_ISOLATE_HELPER_LIBRARY = | 390 const Map<String, String> DEFAULT_ISOLATE_HELPER_LIBRARY = |
389 const <String, String>{ | 391 const <String, String>{ |
390 'startRootIsolate': 'void startRootIsolate(entry, args) {}', | 392 'startRootIsolate': 'void startRootIsolate(entry, args) {}', |
391 '_currentIsolate': 'var _currentIsolate;', | 393 '_currentIsolate': 'var _currentIsolate;', |
392 '_callInIsolate': 'var _callInIsolate;', | 394 '_callInIsolate': 'var _callInIsolate;', |
393 '_WorkerBase': 'class _WorkerBase {}', | 395 '_WorkerBase': 'class _WorkerBase {}', |
394 }; | 396 }; |
395 | 397 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 | 447 |
446 const LookupMap(this._entries, [this._nestedMaps = const []]) | 448 const LookupMap(this._entries, [this._nestedMaps = const []]) |
447 : _key = null, _value = null; | 449 : _key = null, _value = null; |
448 | 450 |
449 const LookupMap.pair(this._key, this._value) | 451 const LookupMap.pair(this._key, this._value) |
450 : _entries = const [], _nestedMaps = const []; | 452 : _entries = const [], _nestedMaps = const []; |
451 V operator[](K k) => null; | 453 V operator[](K k) => null; |
452 }''', | 454 }''', |
453 '_version': 'const _version = "0.0.1+1";', | 455 '_version': 'const _version = "0.0.1+1";', |
454 }; | 456 }; |
OLD | NEW |