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

Side by Side Diff: tests/compiler/dart2js/library_load_test.dart

Issue 17759007: First pass at asynchronous input loading in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 7 years, 3 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
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import "package:expect/expect.dart";
6 import 'mock_compiler.dart';
7
8 class ScanMockCompiler extends MockCompiler {
9 ScanMockCompiler() {
10 isolateHelperLibrary = null;
11 foreignLibrary = null;
12 }
13
14 LibraryElement scanBuiltinLibrary(String filename) {
15 return createLibrary(filename, "main(){}");
16 }
17 }
18
19 void main() {
20 Compiler compiler = new ScanMockCompiler();
21 Expect.equals(null, compiler.isolateHelperLibrary);
22 Expect.equals(null, compiler.foreignLibrary);
23 compiler.onLibraryLoaded(mockLibrary(compiler, "mock"),
24 new Uri(scheme: 'dart', path: '_isolate_helper'));
25 Expect.isTrue(compiler.isolateHelperLibrary != null);
26 compiler.onLibraryLoaded(mockLibrary(compiler, "mock"),
27 new Uri(scheme: 'dart', path: '_foreign_helper'));
28 Expect.isTrue(compiler.isolateHelperLibrary != null);
29 Expect.equals(new Uri(scheme: 'dart', path: '_isolate_helper'),
30 compiler.isolateHelperLibrary.canonicalUri);
31 Expect.isTrue(compiler.foreignLibrary != null);
32 Expect.equals(new Uri(scheme: 'dart', path: '_foreign_helper'),
33 compiler.foreignLibrary.canonicalUri);
34 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/inferrer_factory_test.dart ('k') | tests/compiler/dart2js/list_tracer2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698