| OLD | NEW |
| 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 | 4 |
| 5 library mock_compiler; | 5 library mock_compiler; |
| 6 | 6 |
| 7 import "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:uri'; | 9 import 'dart:uri'; |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 dynamic JS(String typeDescription, String codeTemplate, | 70 dynamic JS(String typeDescription, String codeTemplate, |
| 71 [var arg0, var arg1, var arg2, var arg3, var arg4, var arg5, var arg6, | 71 [var arg0, var arg1, var arg2, var arg3, var arg4, var arg5, var arg6, |
| 72 var arg7, var arg8, var arg9, var arg10, var arg11]) {}'''; | 72 var arg7, var arg8, var arg9, var arg10, var arg11]) {}'''; |
| 73 | 73 |
| 74 const String DEFAULT_INTERCEPTORSLIB = r''' | 74 const String DEFAULT_INTERCEPTORSLIB = r''' |
| 75 class Interceptor { | 75 class Interceptor { |
| 76 toString() {} | 76 toString() {} |
| 77 bool operator==(other) => identical(this, other); | 77 bool operator==(other) => identical(this, other); |
| 78 noSuchMethod(im) { throw im; } | 78 noSuchMethod(im) { throw im; } |
| 79 } | 79 } |
| 80 abstract class JSIndexable {} | 80 abstract class JSIndexable { |
| 81 get length; |
| 82 } |
| 81 class JSArray extends Interceptor implements List, JSIndexable { | 83 class JSArray extends Interceptor implements List, JSIndexable { |
| 82 var length; | 84 var length; |
| 83 operator[](index) {} | 85 operator[](index) {} |
| 84 operator[]=(index, value) {} | 86 operator[]=(index, value) {} |
| 85 var add; | 87 var add; |
| 86 } | 88 } |
| 87 class JSMutableArray extends JSArray {} | 89 class JSMutableArray extends JSArray {} |
| 88 class JSFixedArray extends JSMutableArray {} | 90 class JSFixedArray extends JSMutableArray {} |
| 89 class JSExtendableArray extends JSMutableArray {} | 91 class JSExtendableArray extends JSMutableArray {} |
| 90 class JSString extends Interceptor implements String, JSIndexable { | 92 class JSString extends Interceptor implements String, JSIndexable { |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } | 399 } |
| 398 } | 400 } |
| 399 | 401 |
| 400 class MockDeferredLoadTask extends DeferredLoadTask { | 402 class MockDeferredLoadTask extends DeferredLoadTask { |
| 401 MockDeferredLoadTask(Compiler compiler) : super(compiler); | 403 MockDeferredLoadTask(Compiler compiler) : super(compiler); |
| 402 | 404 |
| 403 void registerMainApp(LibraryElement mainApp) { | 405 void registerMainApp(LibraryElement mainApp) { |
| 404 // Do nothing. | 406 // Do nothing. |
| 405 } | 407 } |
| 406 } | 408 } |
| OLD | NEW |