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 trydart.incremental_compilation_update_test; | 5 library trydart.incremental_compilation_update_test; |
6 | 6 |
7 import 'dart:html' hide | 7 import 'dart:html' hide |
8 Element; | 8 Element; |
9 | 9 |
10 import 'dart:async' show | 10 import 'dart:async' show |
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 class SerializeScopeTestCase extends CompilerTestCase { | 1148 class SerializeScopeTestCase extends CompilerTestCase { |
1149 final String scopeInfo; | 1149 final String scopeInfo; |
1150 | 1150 |
1151 SerializeScopeTestCase( | 1151 SerializeScopeTestCase( |
1152 String source, | 1152 String source, |
1153 LibraryElement library, | 1153 LibraryElement library, |
1154 Compiler compiler) | 1154 Compiler compiler) |
1155 : scopeInfo = computeScopeInfo(compiler, library), | 1155 : scopeInfo = computeScopeInfo(compiler, library), |
1156 super(source, '${library.canonicalUri}'); | 1156 super(source, '${library.canonicalUri}'); |
1157 | 1157 |
1158 Future run() => mainApp.then(checkScopes); | 1158 Future run() => loadMainApp().then(checkScopes); |
1159 | 1159 |
1160 void checkScopes(LibraryElement library) { | 1160 void checkScopes(LibraryElement library) { |
1161 Expect.stringEquals(computeScopeInfo(compiler, library), scopeInfo); | 1161 Expect.stringEquals(computeScopeInfo(compiler, library), scopeInfo); |
1162 } | 1162 } |
1163 | 1163 |
1164 static String computeScopeInfo(Compiler compiler, LibraryElement library) { | 1164 static String computeScopeInfo(Compiler compiler, LibraryElement library) { |
1165 ScopeInformationVisitor visitor = | 1165 ScopeInformationVisitor visitor = |
1166 new ScopeInformationVisitor(compiler, library, 0); | 1166 new ScopeInformationVisitor(compiler, library, 0); |
1167 | 1167 |
1168 visitor.ignoreImports = true; | 1168 visitor.ignoreImports = true; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1235 position: absolute; | 1235 position: absolute; |
1236 left: 0px; | 1236 left: 0px; |
1237 width: 3em; | 1237 width: 3em; |
1238 text-align: right; | 1238 text-align: right; |
1239 background-color: lightgoldenrodyellow; | 1239 background-color: lightgoldenrodyellow; |
1240 } | 1240 } |
1241 '''); | 1241 '''); |
1242 style.type = 'text/css'; | 1242 style.type = 'text/css'; |
1243 return style; | 1243 return style; |
1244 } | 1244 } |
OLD | NEW |