Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: dart/tests/compiler/dart2js_extra/deferred/deferred_class_test.dart

Issue 23523003: Address a number of issues related to computation of currentScript and deferred loading. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add tests Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698