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

Unified Diff: sdk/lib/_internal/pub/test/transformer/dart2js/supports_configuration_with_build_test.dart

Issue 141113011: Support directories other than "web" in pub build. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/test/transformer/dart2js/supports_configuration_with_build_test.dart
diff --git a/sdk/lib/_internal/pub/test/build/copies_browser_js_next_to_entrypoints_test.dart b/sdk/lib/_internal/pub/test/transformer/dart2js/supports_configuration_with_build_test.dart
similarity index 62%
copy from sdk/lib/_internal/pub/test/build/copies_browser_js_next_to_entrypoints_test.dart
copy to sdk/lib/_internal/pub/test/transformer/dart2js/supports_configuration_with_build_test.dart
index 9bd4ff41a7d552df57b5a75013d94000d01bd7f8..e407ee41bf2e284fe7ce8a7e16fb0030d4cd1805 100644
--- a/sdk/lib/_internal/pub/test/build/copies_browser_js_next_to_entrypoints_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/dart2js/supports_configuration_with_build_test.dart
@@ -4,16 +4,16 @@
import 'dart:convert';
-import 'package:path/path.dart' as path;
import 'package:scheduled_test/scheduled_test.dart';
-import '../descriptor.dart' as d;
-import '../test_pub.dart';
+import '../../descriptor.dart' as d;
+import '../../test_pub.dart';
main() {
initConfig();
- integration("compiles dart.js and interop.js next to entrypoints", () {
+ integration("compiles dart.js and interop.js next to entrypoints when "
+ "dartjs is explicitly configured", () {
// Dart2js can take a long time to compile dart code, so we increase the
// timeout to cope with that.
currentSchedule.timeout *= 3;
@@ -50,38 +50,40 @@ main() {
]);
d.dir(appPath, [
- d.appPubspec({"browser": "1.0.0"}),
+ d.pubspec({
+ "name": "myapp",
+ "dependencies": {
+ "browser": "1.0.0"
+ },
+ "transformers": [{
+ "\$dart2js": {
+ "minify": true
+ }
+ }]
+ }),
d.dir('web', [
d.file('file.dart', 'void main() => print("hello");'),
- d.dir('subdir', [
- d.file('subfile.dart', 'void main() => print("subhello");')
- ])
])
]).create();
pubGet();
schedulePub(args: ["build"],
- output: new RegExp(r"Built 12 files!"),
+ output: new RegExp(r"Built 5 files!"),
exitCode: 0);
d.dir(appPath, [
d.dir('build', [
- d.matcherFile('file.dart.js', isNot(isEmpty)),
- d.matcherFile('file.dart.precompiled.js', isNot(isEmpty)),
- d.matcherFile('file.dart.js.map', isNot(isEmpty)),
- d.dir('packages', [d.dir('browser', [
- d.file('dart.js', 'contents of dart.js'),
- d.file('interop.js', 'contents of interop.js')
- ])]),
- d.dir('subdir', [
- d.dir('packages', [d.dir('browser', [
- d.file('dart.js', 'contents of dart.js'),
- d.file('interop.js', 'contents of interop.js')
- ])]),
- d.matcherFile('subfile.dart.js', isNot(isEmpty)),
- d.matcherFile('subfile.dart.precompiled.js', isNot(isEmpty)),
- d.matcherFile('subfile.dart.js.map', isNot(isEmpty))
+ d.dir('web', [
+ d.matcherFile('file.dart.js', isMinifiedDart2JSOutput),
+ d.matcherFile('file.dart.precompiled.js', isNot(isEmpty)),
+ d.matcherFile('file.dart.js.map', isNot(isEmpty)),
+ d.dir('packages', [
+ d.dir('browser', [
+ d.file('dart.js', 'contents of dart.js'),
+ d.file('interop.js', 'contents of interop.js')
+ ])
+ ]),
])
])
]).validate();

Powered by Google App Engine
This is Rietveld 408576698