| OLD | NEW |
| 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 // Dart2js can take a long time to compile dart code, so we increase the timeout |
| 6 // to cope with that. |
| 7 @Timeout.factor(3) |
| 8 |
| 5 import 'package:scheduled_test/scheduled_test.dart'; | 9 import 'package:scheduled_test/scheduled_test.dart'; |
| 6 | 10 |
| 7 import '../descriptor.dart' as d; | 11 import '../descriptor.dart' as d; |
| 8 import '../serve/utils.dart'; | 12 import '../serve/utils.dart'; |
| 9 import '../test_pub.dart'; | 13 import '../test_pub.dart'; |
| 10 | 14 |
| 11 main() { | 15 main() { |
| 12 initConfig(); | |
| 13 group("passes environment constants to dart2js", () { | 16 group("passes environment constants to dart2js", () { |
| 14 setUp(() { | 17 setUp(() { |
| 15 // Dart2js can take a long time to compile dart code, so we increase the | |
| 16 // timeout to cope with that. | |
| 17 currentSchedule.timeout *= 3; | |
| 18 | |
| 19 d.dir(appPath, [ | 18 d.dir(appPath, [ |
| 20 d.appPubspec(), | 19 d.appPubspec(), |
| 21 d.dir('web', [ | 20 d.dir('web', [ |
| 22 d.file('file.dart', | 21 d.file('file.dart', |
| 23 'void main() => print(const String.fromEnvironment("name"));') | 22 'void main() => print(const String.fromEnvironment("name"));') |
| 24 ]) | 23 ]) |
| 25 ]).create(); | 24 ]).create(); |
| 26 }); | 25 }); |
| 27 | 26 |
| 28 integration('from "pub build"', () { | 27 integration('from "pub build"', () { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 56 | 55 |
| 57 pubServe(args: ["--define", "name=fblthp"]); | 56 pubServe(args: ["--define", "name=fblthp"]); |
| 58 requestShouldSucceed("file.dart.js", allOf([ | 57 requestShouldSucceed("file.dart.js", allOf([ |
| 59 contains("fblthp"), | 58 contains("fblthp"), |
| 60 isNot(contains("slartibartfast")) | 59 isNot(contains("slartibartfast")) |
| 61 ])); | 60 ])); |
| 62 endPubServe(); | 61 endPubServe(); |
| 63 }); | 62 }); |
| 64 }); | 63 }); |
| 65 } | 64 } |
| OLD | NEW |