| Index: dart/tests/compiler/dart2js_extra/deferred/deferred_class_test.dart
|
| diff --git a/dart/tests/compiler/dart2js_extra/deferred/deferred_class_test.dart b/dart/tests/compiler/dart2js_extra/deferred/deferred_class_test.dart
|
| index 4eaa40df201dd1938f3dc792c0e005ad52d62797..7e05fbd197bd4d86ba3c4d5ee237540f14fa6d8d 100644
|
| --- a/dart/tests/compiler/dart2js_extra/deferred/deferred_class_test.dart
|
| +++ b/dart/tests/compiler/dart2js_extra/deferred/deferred_class_test.dart
|
| @@ -2,7 +2,10 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -import "package:expect/expect.dart";
|
| +import '../../../async_helper.dart';
|
| +
|
| +import 'package:expect/expect.dart';
|
| +
|
| import 'dart:async';
|
|
|
| @lazy import 'deferred_class_library.dart';
|
| @@ -16,21 +19,25 @@ main() {
|
| Expect.throws(() { x = new MyClass(); }, isNoSuchMethodError);
|
| Expect.isNull(x);
|
| int counter = 0;
|
| + asyncStart();
|
| lazy.load().then((bool didLoad) {
|
| Expect.isTrue(didLoad);
|
| Expect.equals(1, ++counter);
|
| print('deferred_class_library was loaded');
|
| x = new MyClass();
|
| Expect.equals(42, x.foo(87));
|
| + asyncEnd();
|
| });
|
| Expect.equals(0, counter);
|
| Expect.isNull(x);
|
| + asyncStart();
|
| lazy.load().then((bool didLoad) {
|
| Expect.isFalse(didLoad);
|
| Expect.equals(2, ++counter);
|
| print('deferred_class_library was loaded');
|
| x = new MyClass();
|
| Expect.equals(42, x.foo(87));
|
| + asyncEnd();
|
| });
|
| Expect.equals(0, counter);
|
| Expect.isNull(x);
|
|
|