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

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: 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 56%
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..c216b4b202c753b454c557511f0b4797ca67ba82 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,24 @@ 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();
+
+ requestShouldSucceed("index.html", "after");
nweiz 2013/08/13 00:48:45 If you don't use [waitForOutput], isn't there a ra
Bob Nystrom 2013/08/14 23:58:36 Yup. Fixed! This test actually would pass even wi
endPubServe();
});
}

Powered by Google App Engine
This is Rietveld 408576698