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

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

Issue 22941002: Remove unused imports in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file 1 // Copyright (c) 2013, 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 'dart:async'; 7 import 'dart:async';
8 import 'dart:io';
9 8
10 import 'package:http/http.dart' as http; 9 import 'package:http/http.dart' as http;
11 import 'package:scheduled_test/scheduled_process.dart'; 10 import 'package:scheduled_test/scheduled_process.dart';
12 import 'package:scheduled_test/scheduled_test.dart'; 11 import 'package:scheduled_test/scheduled_test.dart';
13 12
14 import '../descriptor.dart' as d;
15 import '../test_pub.dart'; 13 import '../test_pub.dart';
16 14
17 /// The pub process running "pub serve". 15 /// The pub process running "pub serve".
18 ScheduledProcess _pubServer; 16 ScheduledProcess _pubServer;
19 17
20 /// The ephemeral port assigned to the running server. 18 /// The ephemeral port assigned to the running server.
21 int _port; 19 int _port;
22 20
23 /// Schedules starting the "pub serve" process. 21 /// Schedules starting the "pub serve" process.
24 /// 22 ///
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 61
64 /// Schedules an HTTP request to the running pub server with [urlPath] and 62 /// Schedules an HTTP request to the running pub server with [urlPath] and
65 /// verifies that it responds with a 404. 63 /// verifies that it responds with a 404.
66 void requestShould404(String urlPath) { 64 void requestShould404(String urlPath) {
67 schedule(() { 65 schedule(() {
68 return http.get("http://localhost:$_port/$urlPath").then((response) { 66 return http.get("http://localhost:$_port/$urlPath").then((response) {
69 expect(response.statusCode, equals(404)); 67 expect(response.statusCode, equals(404));
70 }); 68 });
71 }, "request $urlPath"); 69 }, "request $urlPath");
72 } 70 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/test/serve/unknown_dependency_test.dart ('k') | sdk/lib/_internal/pub/test/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698