Chromium Code Reviews

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

Issue 184953005: Revamp web socket API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_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/web_socket/url_to_asset_id_with_line_test.dart
diff --git a/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_with_line_test.dart
similarity index 50%
copy from sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart
copy to sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_with_line_test.dart
index c2275bbc16d16fe6c8788301726fb701447806e9..de9ea5ccc425b23aaed4c85c5ce3bdcba14f2a89 100644
--- a/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart
+++ b/sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_with_line_test.dart
@@ -5,23 +5,35 @@
library pub_tests;
import 'package:scheduled_test/scheduled_test.dart';
-
-import '../../../lib/src/exit_codes.dart' as exit_codes;
-
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
import '../utils.dart';
main() {
initConfig();
- integration("throws an error if custom roots don't exist", () {
+ integration("provides output line number if given source one", () {
d.dir(appPath, [
d.appPubspec(),
- d.dir("baz")
+ d.dir("web", [
+ d.file("main.dart", "main")
+ ])
]).create();
- var server = startPubServe(args: ["foo", "bar", "baz"]);
- server.stderr.expect('Directories "bar" and "foo" don\'t exist.');
- server.shouldExit(exit_codes.USAGE);
+ pubServe();
+
+ schedule(() {
+ // Paths in web/.
+ expectWebSocketCall({
+ "command": "urlToAssetId",
+ "url": getServerUrl("web", "main.dart"),
+ "line": 12345
+ }, replyEquals: {
+ "package": "myapp",
+ "path": "web/main.dart",
+ "line": 12345
+ });
+ });
+
+ endPubServe();
});
}
« no previous file with comments | « sdk/lib/_internal/pub/test/serve/web_socket/url_to_asset_id_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine