Chromium Code Reviews| OLD | NEW |
|---|---|
| 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:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 | 10 |
| 11 import 'package:pub/src/utils.dart'; | |
| 11 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
|
Bob Nystrom
2015/05/22 00:05:17
Swap.
nweiz
2015/05/22 00:14:24
Done.
| |
| 12 import 'package:scheduled_test/scheduled_process.dart'; | 13 import 'package:scheduled_test/scheduled_process.dart'; |
| 13 import 'package:scheduled_test/scheduled_stream.dart'; | 14 import 'package:scheduled_test/scheduled_stream.dart'; |
| 14 import 'package:scheduled_test/scheduled_test.dart'; | 15 import 'package:scheduled_test/scheduled_test.dart'; |
| 15 import 'package:stack_trace/stack_trace.dart'; | 16 import 'package:stack_trace/stack_trace.dart'; |
| 16 | 17 |
| 17 import '../../lib/src/utils.dart'; | |
| 18 import '../descriptor.dart' as d; | 18 import '../descriptor.dart' as d; |
| 19 import '../test_pub.dart'; | 19 import '../test_pub.dart'; |
| 20 | 20 |
| 21 /// The pub process running "pub serve". | 21 /// The pub process running "pub serve". |
| 22 ScheduledProcess _pubServer; | 22 ScheduledProcess _pubServer; |
| 23 | 23 |
| 24 /// The ephemeral port assign to the running admin server. | 24 /// The ephemeral port assign to the running admin server. |
| 25 int _adminPort; | 25 int _adminPort; |
| 26 | 26 |
| 27 /// The ephemeral ports assigned to the running servers, associated with the | 27 /// The ephemeral ports assigned to the running servers, associated with the |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 493 /// included. Unlike [getServerUrl], this should only be called after the ports | 493 /// included. Unlike [getServerUrl], this should only be called after the ports |
| 494 /// are known. | 494 /// are known. |
| 495 String _getServerUrlSync([String root, String path]) { | 495 String _getServerUrlSync([String root, String path]) { |
| 496 if (root == null) root = 'web'; | 496 if (root == null) root = 'web'; |
| 497 expect(_ports, contains(root)); | 497 expect(_ports, contains(root)); |
| 498 var url = "http://localhost:${_ports[root]}"; | 498 var url = "http://localhost:${_ports[root]}"; |
| 499 if (path != null) url = "$url/$path"; | 499 if (path != null) url = "$url/$path"; |
| 500 return url; | 500 return url; |
| 501 } | 501 } |
| 502 | 502 |
| OLD | NEW |