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

Unified Diff: sdk/lib/_internal/pub/test/serve/web_socket/asset_id_to_urls_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. 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/web_socket/asset_id_to_urls_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/asset_id_to_urls_with_line_test.dart
similarity index 52%
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/asset_id_to_urls_with_line_test.dart
index c2275bbc16d16fe6c8788301726fb701447806e9..12bc06f3a223be9a86d55993e13058c8e7fc025f 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/asset_id_to_urls_with_line_test.dart
@@ -5,23 +5,33 @@
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("assetIdToUrls provides output line if given source", () {
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(() {
+ expectWebSocketCall({
+ "command": "assetIdToUrls",
+ "path": "web/main.dart",
+ "line": 12345
+ }, replyEquals: {
+ "urls": [getServerUrl("web", "main.dart")],
+ "line": 12345
+ });
+ });
+
+ endPubServe();
});
}

Powered by Google App Engine
This is Rietveld 408576698