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

Side by Side Diff: sdk/lib/_internal/pub/test/serve/web_socket/unserve_directory_superdirectory_still_watched_test.dart

Issue 216593006: Don't allow overlapping source directories. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/pub/test/serve/web_socket/unserve_directory_subdirectory_still_watched_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library pub_tests;
6
7 import 'package:path/path.dart' as p;
8
9 import '../../descriptor.dart' as d;
10 import '../../test_pub.dart';
11 import '../utils.dart';
12
13 main() {
14 initConfig();
15 integration("when a superdirectory is unbound it is still watched because "
16 "the subdirectory is watching it", () {
17 d.dir(appPath, [
18 d.appPubspec(),
19 d.dir("example", [
20 d.dir("one", [
21 d.file("foo.txt", "before")
22 ])
23 ])
24 ]).create();
25
26 var exampleOne = p.join("example", "one");
27 pubServe(args: [exampleOne, "example"]);
28
29 requestShouldSucceed("one/foo.txt", "before", root: "example");
30 requestShouldSucceed("foo.txt", "before", root: exampleOne);
31
32 // Unbind the subdirectory.
33 expectWebSocketResult("unserveDirectory", {"path": "example"}, {
34 "url": getServerUrl("example")
35 });
36
37 // "example" should not be served now.
38 requestShouldNotConnect("one/foo.txt", root: "example");
39
40 // "example/one" is still fine.
41 requestShouldSucceed("foo.txt", "before", root: exampleOne);
42
43 // And still being watched.
44 d.dir(appPath, [
45 d.appPubspec(),
46 d.dir("example", [
47 d.dir("one", [
48 d.file("foo.txt", "after")
49 ])
50 ])
51 ]).create();
52
53 waitForBuildSuccess();
54 requestShouldSucceed("foo.txt", "after", root: exampleOne);
55
56 endPubServe();
57 });
58 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/test/serve/web_socket/unserve_directory_subdirectory_still_watched_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698