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

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

Issue 22986002: Add file watching to pub serve. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move some code around. Created 7 years, 4 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
« no previous file with comments | « sdk/lib/_internal/pub/test/serve/watch_modified_file_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/test/serve/watch_removed_file_test.dart
diff --git a/sdk/lib/_internal/pub/test/serve/missing_asset_test.dart b/sdk/lib/_internal/pub/test/serve/watch_removed_file_test.dart
similarity index 52%
copy from sdk/lib/_internal/pub/test/serve/missing_asset_test.dart
copy to sdk/lib/_internal/pub/test/serve/watch_removed_file_test.dart
index 1f69b6c4471db387328852e83ff03d6865ad829b..f2a41351618212582cb755b9de09d6a3a908ef8e 100644
--- a/sdk/lib/_internal/pub/test/serve/missing_asset_test.dart
+++ b/sdk/lib/_internal/pub/test/serve/watch_removed_file_test.dart
@@ -6,23 +6,32 @@ library pub_tests;
import 'dart:io';
+import 'package:path/path.dart' as path;
+import 'package:scheduled_test/scheduled_test.dart';
+
+import '../../lib/src/io.dart';
import '../descriptor.dart' as d;
import '../test_pub.dart';
import 'utils.dart';
main() {
initConfig();
- integration("responds with a 404 for missing assets", () {
+ integration("stop serving a file that is removed", () {
d.dir(appPath, [
- d.appPubspec()
+ d.appPubspec(),
+ d.dir("web", [
+ d.file("index.html", "body")
+ ])
]).create();
startPubServe();
+ requestShouldSucceed("index.html", "body");
+
+ schedule(() => deleteEntry(
+ path.join(sandboxDir, appPath, "web", "index.html")));
+
+ waitForBuildSuccess();
requestShould404("index.html");
- requestShould404("packages/myapp/nope.dart");
- requestShould404("assets/myapp/nope.png");
- requestShould404("dir/packages/myapp/nope.dart");
- requestShould404("dir/assets/myapp/nope.png");
endPubServe();
});
}
« no previous file with comments | « sdk/lib/_internal/pub/test/serve/watch_modified_file_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698