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

Unified Diff: sdk/lib/_internal/pub/test/serve/does_not_serve_dart_in_release_test.dart

Issue 69043003: Allow user to specify mode for pub build/serve. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Get rid of "--minify" flags. Created 7 years, 1 month 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/serve/does_not_serve_dart_in_release_test.dart
diff --git a/sdk/lib/_internal/pub/test/serve/serve_from_app_web_test.dart b/sdk/lib/_internal/pub/test/serve/does_not_serve_dart_in_release_test.dart
similarity index 54%
copy from sdk/lib/_internal/pub/test/serve/serve_from_app_web_test.dart
copy to sdk/lib/_internal/pub/test/serve/does_not_serve_dart_in_release_test.dart
index 4859b813c8fa640223c10aac17d2810676804b69..b77b4fe1e4b4757028ca6b08c5a79eb18cdcfa7e 100644
--- a/sdk/lib/_internal/pub/test/serve/serve_from_app_web_test.dart
+++ b/sdk/lib/_internal/pub/test/serve/does_not_serve_dart_in_release_test.dart
@@ -10,24 +10,24 @@ import 'utils.dart';
main() {
initConfig();
- integration("finds files in the app's web directory", () {
+ integration("does not serve .dart files in release mode", () {
d.dir(appPath, [
d.appPubspec(),
+ d.dir("lib", [
+ d.file("lib.dart", "lib() => print('hello');"),
+ ]),
d.dir("web", [
- d.file("index.html", "<body>"),
d.file("file.dart", "main() => print('hello');"),
d.dir("sub", [
- d.file("file.html", "<body>in subdir</body>"),
- d.file("lib.dart", "main() => 'foo';"),
+ d.file("sub.dart", "main() => 'foo';"),
])
])
]).create();
- pubServe();
- requestShouldSucceed("index.html", "<body>");
- requestShouldSucceed("file.dart", "main() => print('hello');");
- requestShouldSucceed("sub/file.html", "<body>in subdir</body>");
- requestShouldSucceed("sub/lib.dart", "main() => 'foo';");
+ pubServe(args: ["--mode", "release"]);
+ requestShould404("file.dart");
+ requestShould404("packages/myapp/lib.dart");
+ requestShould404("sub/sub.dart");
endPubServe();
});
}

Powered by Google App Engine
This is Rietveld 408576698