OLD | NEW |
| (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:scheduled_test/scheduled_test.dart'; | |
6 | |
7 import '../descriptor.dart' as d; | |
8 import '../test_pub.dart'; | |
9 import 'utils.dart'; | |
10 | |
11 main() { | |
12 // This is a regression test for http://dartbug.com/16617. | |
13 | |
14 initConfig(); | |
15 | |
16 integration( | |
17 "compiles dart.js and interop.js next to entrypoints when " | |
18 "browser is a dependency_override", | |
19 () { | |
20 // Dart2js can take a long time to compile dart code, so we increase the | |
21 // timeout to cope with that. | |
22 currentSchedule.timeout *= 3; | |
23 | |
24 serveBrowserPackage(); | |
25 | |
26 d.dir(appPath, [d.pubspec({ | |
27 "name": "myapp", | |
28 "dependency_overrides": { | |
29 "browser": "any" | |
30 } | |
31 }), | |
32 d.dir( | |
33 'web', | |
34 [d.file('file.dart', 'void main() => print("hello");')])]).create(
); | |
35 | |
36 pubGet(); | |
37 | |
38 schedulePub( | |
39 args: ["build", "--all"], | |
40 output: new RegExp(r'Built 3 files to "build".')); | |
41 | |
42 d.dir( | |
43 appPath, | |
44 [ | |
45 d.dir( | |
46 'build', | |
47 [ | |
48 d.dir( | |
49 'web', | |
50 [ | |
51 d.dir( | |
52 'packages', | |
53 [ | |
54 d.dir( | |
55 'browser', | |
56 [ | |
57 d.file('dart.js', 'contents of dart.
js'), | |
58 d.file('interop.js', 'contents of in
terop.js')])])])])]).validate(); | |
59 }); | |
60 } | |
OLD | NEW |