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

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

Issue 163733003: Let deferred load work from worker isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test, so it fails on the VM instead of timeout. Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 '../../../../pkg/unittest/lib/unittest.dart'; 4 import '../../../../pkg/unittest/lib/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_api_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 lib2.foo(""); 19 lib2.foo("");
19 }).catchError(expectAsync((_) { 20 }).catchError(expectAsync((_) {
20 expect(true, true); 21 expect(true, true);
21 }), test: (e) => e is DeferredLoadException); 22 }), test: (e) => e is DeferredLoadException);
22 }); 23 });
23 } 24 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698