| OLD | NEW |
| (Empty) |
| 1 import 'dart:isolate'; | |
| 2 import 'dart:async'; | |
| 3 import 'dart:html'; | |
| 4 import 'package:unittest/unittest.dart'; | |
| 5 | |
| 6 @a import 'deferred_in_isolate_lib.dart' as lib1; | |
| 7 @b import 'deferred_library.dart' as lib2; | |
| 8 | |
| 9 const a = const DeferredLibrary("lib1"); | |
| 10 const b = const DeferredLibrary("NonExistingFile", uri: "wrong/wrong.js"); | |
| 11 | |
| 12 main() { | |
| 13 test("Deferred loading failing to load", () { | |
| 14 a.load().then(expectAsync((_) { | |
| 15 expect(lib1.f(), equals("hi")); | |
| 16 })); | |
| 17 b.load().then((_) { | |
| 18 expect(false, true); | |
| 19 lib2.foo(""); | |
| 20 }).catchError(expectAsync((_) { | |
| 21 expect(true, true); | |
| 22 }), test: (e) => e is DeferredLoadException); | |
| 23 }); | |
| 24 } | |
| OLD | NEW |