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

Side by Side Diff: tests/lib/async/deferred/deferred_fail_to_load_test.dart

Issue 221663005: Load deferred chunks in the right order. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 import 'dart:isolate'; 1 import 'dart:isolate';
2 import 'dart:async'; 2 import 'dart:async';
3 import 'dart:html'; 3 import 'dart:html';
4 import 'package:unittest/unittest.dart'; 4 import 'package:unittest/unittest.dart';
5 5
6 @a import 'deferred_in_isolate_lib.dart' as lib1; 6 @a import 'deferred_in_isolate_lib.dart' as lib1;
7 @b import 'deferred_api_library.dart' as lib2; 7 @b import 'deferred_library.dart' as lib2;
8 8
9 const a = const DeferredLibrary("lib1"); 9 const a = const DeferredLibrary("lib1");
10 const b = const DeferredLibrary("NonExistingFile", uri: "wrong/wrong.js"); 10 const b = const DeferredLibrary("NonExistingFile", uri: "wrong/wrong.js");
11 11
12 main() { 12 main() {
13 test("Deferred loading failing to load", () { 13 test("Deferred loading failing to load", () {
14 a.load().then(expectAsync((_) { 14 a.load().then(expectAsync((_) {
15 expect(lib1.f(), equals("hi")); 15 expect(lib1.f(), equals("hi"));
16 })); 16 }));
17 b.load().then((_) { 17 b.load().then((_) {
18 expect(false, true); 18 expect(false, true);
19 lib2.foo(""); 19 lib2.foo("");
20 }).catchError(expectAsync((_) { 20 }).catchError(expectAsync((_) {
21 expect(true, true); 21 expect(true, true);
22 }), test: (e) => e is DeferredLoadException); 22 }), test: (e) => e is DeferredLoadException);
23 }); 23 });
24 } 24 }
OLDNEW
« no previous file with comments | « tests/lib/async/deferred/deferred_api_test.dart ('k') | tests/lib/async/deferred/deferred_in_isolate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698