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

Unified Diff: sdk/lib/_internal/pub/test/serve/watch_modified_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
Index: sdk/lib/_internal/pub/test/serve/watch_modified_file_test.dart
diff --git a/sdk/lib/_internal/pub/test/serve/missing_asset_test.dart b/sdk/lib/_internal/pub/test/serve/watch_modified_file_test.dart
similarity index 54%
copy from sdk/lib/_internal/pub/test/serve/missing_asset_test.dart
copy to sdk/lib/_internal/pub/test/serve/watch_modified_file_test.dart
index 1f69b6c4471db387328852e83ff03d6865ad829b..864d8aa1c943f0a4cbe2482c7f12d32d90dcc908 100644
--- a/sdk/lib/_internal/pub/test/serve/missing_asset_test.dart
+++ b/sdk/lib/_internal/pub/test/serve/watch_modified_file_test.dart
@@ -12,17 +12,25 @@ import 'utils.dart';
main() {
initConfig();
- integration("responds with a 404 for missing assets", () {
+ integration("watches modifications to files", () {
d.dir(appPath, [
- d.appPubspec()
+ d.appPubspec(),
+ d.dir("web", [
+ d.file("index.html", "before")
+ ])
]).create();
startPubServe();
- 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");
+ requestShouldSucceed("index.html", "before");
+
+ d.dir(appPath, [
+ d.dir("web", [
+ d.file("index.html", "after")
+ ])
+ ]).create();
+
+ waitForBuildSuccess();
+ requestShouldSucceed("index.html", "after");
endPubServe();
});
}

Powered by Google App Engine
This is Rietveld 408576698