| Index: dart/tests/try/web/incremental_compilation_update_test.dart
|
| diff --git a/dart/tests/try/web/incremental_compilation_update_test.dart b/dart/tests/try/web/incremental_compilation_update_test.dart
|
| index 282e299f87fc6ab43149b48b092ba284a241bb88..f4bfecdbb7fe3c021d075006c714e943d19bda55 100644
|
| --- a/dart/tests/try/web/incremental_compilation_update_test.dart
|
| +++ b/dart/tests/try/web/incremental_compilation_update_test.dart
|
| @@ -40,6 +40,9 @@ import 'package:compiler/src/elements/elements.dart' show
|
| import 'package:compiler/src/dart2jslib.dart' show
|
| Compiler;
|
|
|
| +import 'package:dart2js_incremental/dart2js_incremental.dart' show
|
| + IncrementalCompilationFailed;
|
| +
|
| import 'program_result.dart';
|
|
|
| const int TIMEOUT = 100;
|
| @@ -1754,14 +1757,23 @@ Future compileAndRun(EncodedResult encodedResult) {
|
|
|
| WebInputProvider inputProvider =
|
| test.incrementalCompiler.inputProvider;
|
| - Uri uri = test.scriptUri.resolve('?v${version++}');
|
| - inputProvider.cachedSources[uri] = new Future.value(program.code);
|
| + Uri base = test.scriptUri;
|
| + Map<String, String> code = program.code is String
|
| + ? { 'main.dart': program.code }
|
| + : program.code;
|
| + Map<Uri, Uri> uriMap = <Uri, Uri>{};
|
| + for (String name in code.keys) {
|
| + Uri uri = base.resolve('$name?v${version++}');
|
| + inputProvider.cachedSources[uri] = new Future.value(code[name]);
|
| + uriMap[base.resolve(name)] = uri;
|
| + }
|
| Future future = test.incrementalCompiler.compileUpdates(
|
| - {test.scriptUri: uri}, logVerbose: logger, logTime: logger);
|
| + uriMap, logVerbose: logger, logTime: logger);
|
| future = future.catchError((error, trace) {
|
| String statusMessage;
|
| Future result;
|
| - if (program.compileUpdatesShouldThrow) {
|
| + if (program.compileUpdatesShouldThrow &&
|
| + error is IncrementalCompilationFailed) {
|
| statusMessage = "Expected error in compileUpdates.";
|
| result = null;
|
| } else {
|
|
|