| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 }; | 234 }; |
| 235 | 235 |
| 236 const Map<String, String> DEFAULT_INTERCEPTORS_LIBRARY = const <String, String>{ | 236 const Map<String, String> DEFAULT_INTERCEPTORS_LIBRARY = const <String, String>{ |
| 237 'findIndexForNativeSubclassType': | 237 'findIndexForNativeSubclassType': |
| 238 'findIndexForNativeSubclassType(type) {}', | 238 'findIndexForNativeSubclassType(type) {}', |
| 239 'getDispatchProperty': 'getDispatchProperty(o) {}', | 239 'getDispatchProperty': 'getDispatchProperty(o) {}', |
| 240 'getInterceptor': 'getInterceptor(x) {}', | 240 'getInterceptor': 'getInterceptor(x) {}', |
| 241 'getNativeInterceptor': 'getNativeInterceptor(x) {}', | 241 'getNativeInterceptor': 'getNativeInterceptor(x) {}', |
| 242 'initializeDispatchProperty': 'initializeDispatchProperty(f,p,i) {}', | 242 'initializeDispatchProperty': 'initializeDispatchProperty(f,p,i) {}', |
| 243 'initializeDispatchPropertyCSP': 'initializeDispatchPropertyCSP(f,p,i) {}', | 243 'initializeDispatchPropertyCSP': 'initializeDispatchPropertyCSP(f,p,i) {}', |
| 244 'interceptedNames': 'var interceptedNames;', | |
| 245 'Interceptor': r''' | 244 'Interceptor': r''' |
| 246 class Interceptor { | 245 class Interceptor { |
| 247 toString() {} | 246 toString() {} |
| 248 bool operator==(other) => identical(this, other); | 247 bool operator==(other) => identical(this, other); |
| 249 get hashCode => throw "Interceptor.hashCode not implemented."; | 248 get hashCode => throw "Interceptor.hashCode not implemented."; |
| 250 noSuchMethod(im) { throw im; } | 249 noSuchMethod(im) { throw im; } |
| 251 }''', | 250 }''', |
| 252 'JSArray': r''' | 251 'JSArray': r''' |
| 253 class JSArray<E> extends Interceptor implements List<E>, JSIndexable { | 252 class JSArray<E> extends Interceptor implements List<E>, JSIndexable { |
| 254 JSArray(); | 253 JSArray(); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 const Map<String, String> DEFAULT_ASYNC_LIBRARY = const <String, String>{ | 362 const Map<String, String> DEFAULT_ASYNC_LIBRARY = const <String, String>{ |
| 364 'Future': 'class Future<T> {}', | 363 'Future': 'class Future<T> {}', |
| 365 'Stream': 'class Stream<T> {}', | 364 'Stream': 'class Stream<T> {}', |
| 366 }; | 365 }; |
| 367 | 366 |
| 368 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ | 367 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ |
| 369 'Comment': 'class Comment {}', | 368 'Comment': 'class Comment {}', |
| 370 'MirrorSystem': 'class MirrorSystem {}', | 369 'MirrorSystem': 'class MirrorSystem {}', |
| 371 'MirrorsUsed': 'class MirrorsUsed {}', | 370 'MirrorsUsed': 'class MirrorsUsed {}', |
| 372 }; | 371 }; |
| OLD | NEW |