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

Side by Side Diff: sdk/lib/_internal/pub/test/dart2js/outputs_deferred_libraries_test.dart

Issue 1165473002: Start pulling pub from its own repo. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Code review changes Created 5 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'package:scheduled_test/scheduled_test.dart';
6
7 import '../descriptor.dart' as d;
8 import '../test_pub.dart';
9
10 const MAIN = """
11 import 'dart:async';
12
13 import 'a.dart' deferred as a;
14 import 'b.dart' deferred as b;
15
16 void main() {
17 Future.wait([lazyA.loadLibrary(), lazyB.loadLibrary()]).then((_) {
18 a.fn();
19 b.fn();
20 });
21 }
22 """;
23
24 const A = """
25 library a;
26
27 fn() => print("a");
28 """;
29
30 const B = """
31 library b;
32
33 fn() => print("b");
34 """;
35
36 main() {
37 initConfig();
38 integration("compiles deferred libraries to separate outputs", () {
39 // Dart2js can take a long time to compile dart code, so we increase the
40 // timeout to cope with that.
41 currentSchedule.timeout *= 3;
42
43 d.dir(appPath, [
44 d.appPubspec(),
45 d.dir('web', [
46 d.file('main.dart', MAIN),
47 d.file('a.dart', A),
48 d.file('b.dart', B)
49 ])
50 ]).create();
51
52 schedulePub(args: ["build"],
53 output: new RegExp(r'Built 3 files to "build".'));
54
55 d.dir(appPath, [
56 d.dir('build', [
57 d.dir('web', [
58 d.matcherFile('main.dart.js', isNot(isEmpty)),
59 d.matcherFile('main.dart.js_1.part.js', isNot(isEmpty)),
60 d.matcherFile('main.dart.js_2.part.js', isNot(isEmpty)),
61 ])
62 ])
63 ]).validate();
64 });
65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698