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

Side by Side Diff: test/serve/web_socket/url_to_asset_id_test.dart

Issue 1282533003: Don't implicitly run "pub get". (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library pub_tests; 5 library pub_tests;
6 6
7 import 'package:scheduled_test/scheduled_test.dart'; 7 import 'package:scheduled_test/scheduled_test.dart';
8 import '../../descriptor.dart' as d; 8 import '../../descriptor.dart' as d;
9 import '../../test_pub.dart'; 9 import '../../test_pub.dart';
10 import '../utils.dart'; 10 import '../utils.dart';
(...skipping 21 matching lines...) Expand all
32 d.file("bar.html", "bar"), 32 d.file("bar.html", "bar"),
33 ]) 33 ])
34 ]), 34 ]),
35 d.dir("web", [ 35 d.dir("web", [
36 d.file("index.html", "<body>"), 36 d.file("index.html", "<body>"),
37 d.dir("sub", [ 37 d.dir("sub", [
38 d.file("bar.html", "bar"), 38 d.file("bar.html", "bar"),
39 ]) 39 ])
40 ]) 40 ])
41 ]).create(); 41 ]).create();
42
43 pubGet();
42 }); 44 });
43 45
44 integration("converts URLs to matching asset ids in web/", () { 46 integration("converts URLs to matching asset ids in web/", () {
45 pubServe(shouldGetFirst: true); 47 pubServe();
46 expectWebSocketResult("urlToAssetId", { 48 expectWebSocketResult("urlToAssetId", {
47 "url": getServerUrl("web", "index.html") 49 "url": getServerUrl("web", "index.html")
48 }, {"package": "myapp", "path": "web/index.html"}); 50 }, {"package": "myapp", "path": "web/index.html"});
49 endPubServe(); 51 endPubServe();
50 }); 52 });
51 53
52 integration("converts URLs to matching asset ids in subdirectories of web/", 54 integration("converts URLs to matching asset ids in subdirectories of web/",
53 () { 55 () {
54 pubServe(shouldGetFirst: true); 56 pubServe();
55 expectWebSocketResult("urlToAssetId", { 57 expectWebSocketResult("urlToAssetId", {
56 "url": getServerUrl("web", "sub/bar.html") 58 "url": getServerUrl("web", "sub/bar.html")
57 }, {"package": "myapp", "path": "web/sub/bar.html"}); 59 }, {"package": "myapp", "path": "web/sub/bar.html"});
58 endPubServe(); 60 endPubServe();
59 }); 61 });
60 62
61 integration("converts URLs to matching asset ids in test/", () { 63 integration("converts URLs to matching asset ids in test/", () {
62 pubServe(shouldGetFirst: true); 64 pubServe();
63 expectWebSocketResult("urlToAssetId", { 65 expectWebSocketResult("urlToAssetId", {
64 "url": getServerUrl("test", "index.html") 66 "url": getServerUrl("test", "index.html")
65 }, {"package": "myapp", "path": "test/index.html"}); 67 }, {"package": "myapp", "path": "test/index.html"});
66 endPubServe(); 68 endPubServe();
67 }); 69 });
68 70
69 integration("converts URLs to matching asset ids in subdirectories of test/", 71 integration("converts URLs to matching asset ids in subdirectories of test/",
70 () { 72 () {
71 pubServe(shouldGetFirst: true); 73 pubServe();
72 expectWebSocketResult("urlToAssetId", { 74 expectWebSocketResult("urlToAssetId", {
73 "url": getServerUrl("test", "sub/bar.html") 75 "url": getServerUrl("test", "sub/bar.html")
74 }, {"package": "myapp", "path": "test/sub/bar.html"}); 76 }, {"package": "myapp", "path": "test/sub/bar.html"});
75 endPubServe(); 77 endPubServe();
76 }); 78 });
77 79
78 integration("converts URLs to matching asset ids in the entrypoint's lib/", 80 integration("converts URLs to matching asset ids in the entrypoint's lib/",
79 () { 81 () {
80 // Path in root package's lib/. 82 // Path in root package's lib/.
81 pubServe(shouldGetFirst: true); 83 pubServe();
82 expectWebSocketResult("urlToAssetId", { 84 expectWebSocketResult("urlToAssetId", {
83 "url": getServerUrl("web", "packages/myapp/myapp.dart") 85 "url": getServerUrl("web", "packages/myapp/myapp.dart")
84 }, {"package": "myapp", "path": "lib/myapp.dart"}); 86 }, {"package": "myapp", "path": "lib/myapp.dart"});
85 endPubServe(); 87 endPubServe();
86 }); 88 });
87 89
88 integration("converts URLs to matching asset ids in a dependency's lib/", () { 90 integration("converts URLs to matching asset ids in a dependency's lib/", () {
89 // Path in lib/. 91 // Path in lib/.
90 pubServe(shouldGetFirst: true); 92 pubServe();
91 expectWebSocketResult("urlToAssetId", { 93 expectWebSocketResult("urlToAssetId", {
92 "url": getServerUrl("web", "packages/foo/foo.dart") 94 "url": getServerUrl("web", "packages/foo/foo.dart")
93 }, {"package": "foo", "path": "lib/foo.dart"}); 95 }, {"package": "foo", "path": "lib/foo.dart"});
94 endPubServe(); 96 endPubServe();
95 }); 97 });
96 } 98 }
OLDNEW
« no previous file with comments | « test/serve/web_socket/url_to_asset_id_errors_test.dart ('k') | test/serve/web_socket/url_to_asset_id_with_line_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698