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

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

Issue 356573002: Revert "Move Compiler.libraries to LibraryLoder." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:expect/expect.dart'; 5 import 'package:expect/expect.dart';
6 import "package:async_helper/async_helper.dart"; 6 import "package:async_helper/async_helper.dart";
7 import 'memory_source_file_helper.dart'; 7 import 'memory_source_file_helper.dart';
8 import "memory_compiler.dart"; 8 import "memory_compiler.dart";
9 import "dart:async"; 9 import "dart:async";
10 10
11 import 'package:compiler/implementation/dart2jslib.dart' 11 import 'package:compiler/implementation/dart2jslib.dart'
12 as dart2js; 12 as dart2js;
13 13
14 runTest(String mainScript, test) { 14 runTest(String mainScript, test) {
15 Compiler compiler = compilerFor(MEMORY_SOURCE_FILES, 15 Compiler compiler = compilerFor(MEMORY_SOURCE_FILES,
16 outputProvider: new OutputCollector()); 16 outputProvider: new OutputCollector());
17 asyncTest(() => compiler.run(Uri.parse(mainScript)) 17 asyncTest(() => compiler.run(Uri.parse(mainScript))
18 .then((_) => test(compiler))); 18 .then((_) => test(compiler)));
19 } 19 }
20 20
21 void main() { 21 void main() {
22 runTest('memory:main.dart', (compiler) { 22 runTest('memory:main.dart', (compiler) {
23 lookupLibrary(name) {
24 return compiler.libraryLoader.lookupLibrary(Uri.parse(name));
25 }
26
27 var main = compiler.mainApp.find(dart2js.Compiler.MAIN); 23 var main = compiler.mainApp.find(dart2js.Compiler.MAIN);
28 Expect.isNotNull(main, "Could not find 'main'"); 24 Expect.isNotNull(main, "Could not find 'main'");
29 compiler.deferredLoadTask.onResolutionComplete(main); 25 compiler.deferredLoadTask.onResolutionComplete(main);
30 26
31 var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement; 27 var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement;
32 28
33 var lib = lookupLibrary("memory:lib.dart"); 29 var lib = compiler.libraries["memory:lib.dart"];
34 var a = lib.find("a"); 30 var a = lib.find("a");
35 var b = lib.find("b"); 31 var b = lib.find("b");
36 var c = lib.find("c"); 32 var c = lib.find("c");
37 var d = lib.find("d"); 33 var d = lib.find("d");
38 Expect.equals(outputUnitForElement(a), outputUnitForElement(b)); 34 Expect.equals(outputUnitForElement(a), outputUnitForElement(b));
39 Expect.equals(outputUnitForElement(a), outputUnitForElement(c)); 35 Expect.equals(outputUnitForElement(a), outputUnitForElement(c));
40 Expect.equals(outputUnitForElement(a), outputUnitForElement(d)); 36 Expect.equals(outputUnitForElement(a), outputUnitForElement(d));
41 }); 37 });
42 } 38 }
43 39
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 class D2 { 107 class D2 {
112 D2(x) { 108 D2(x) {
113 d(); 109 d();
114 } 110 }
115 } 111 }
116 112
117 // Implicit redirecting "super" call with a parameter via mixin. 113 // Implicit redirecting "super" call with a parameter via mixin.
118 class D3 = D2 with D1; 114 class D3 = D2 with D1;
119 """, 115 """,
120 }; 116 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698