| 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 db2e40adbb873deed97cf31f1041d167686db8f5..70ff478f030bc503fc9a07f892501315e122a4e5 100644
|
| --- a/dart/tests/try/web/incremental_compilation_update_test.dart
|
| +++ b/dart/tests/try/web/incremental_compilation_update_test.dart
|
| @@ -22,6 +22,8 @@ import 'web_compiler_test_case.dart' show
|
|
|
| import 'program_result.dart';
|
|
|
| +const int TIMEOUT = 100;
|
| +
|
| const List<List<ProgramResult>> tests = const <List<ProgramResult>>[
|
| // Basic hello-world test.
|
| const <ProgramResult>[
|
| @@ -203,7 +205,7 @@ Future compileAndRun(List<ProgramResult> programs) {
|
| Uri uri = test.scriptUri.resolve('?v${version++}');
|
| inputProvider.cachedSources[uri] = new Future.value(program.code);
|
| Future future = test.incrementalCompiler.compileUpdates(
|
| - {test.scriptUri: uri}, logVerbose: print, logTime: print);
|
| + {test.scriptUri: uri}, logVerbose: logger, logTime: logger);
|
| return future.then((String update) {
|
| print({'update': update});
|
| iframe.contentWindow.postMessage(['apply-update', update], '*');
|
| @@ -221,3 +223,13 @@ Future compileAndRun(List<ProgramResult> programs) {
|
| iframe.remove();
|
| });
|
| }
|
| +
|
| +void logger(x) {
|
| + print(x);
|
| + bool isCheckedMode = false;
|
| + assert(isCheckedMode = true);
|
| + int timeout = isCheckedMode ? TIMEOUT * 2 : TIMEOUT;
|
| + if (listener.elapsed > timeout) {
|
| + throw 'Test timed out.';
|
| + }
|
| +}
|
|
|