| 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; | |
| 6 | |
| 7 import 'dart:async'; | 5 import 'dart:async'; |
| 8 import 'dart:convert'; | 6 import 'dart:convert'; |
| 9 import 'dart:io'; | 7 import 'dart:io'; |
| 10 | 8 |
| 11 import 'package:http/http.dart' as http; | 9 import 'package:http/http.dart' as http; |
| 12 import 'package:pub/src/utils.dart'; | 10 import 'package:pub/src/utils.dart'; |
| 13 import 'package:scheduled_test/scheduled_process.dart'; | 11 import 'package:scheduled_test/scheduled_process.dart'; |
| 14 import 'package:scheduled_test/scheduled_stream.dart'; | 12 import 'package:scheduled_test/scheduled_stream.dart'; |
| 15 import 'package:scheduled_test/scheduled_test.dart'; | 13 import 'package:scheduled_test/scheduled_test.dart'; |
| 16 | 14 |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 /// included. Unlike [getServerUrl], this should only be called after the ports | 476 /// included. Unlike [getServerUrl], this should only be called after the ports |
| 479 /// are known. | 477 /// are known. |
| 480 String _getServerUrlSync([String root, String path]) { | 478 String _getServerUrlSync([String root, String path]) { |
| 481 if (root == null) root = 'web'; | 479 if (root == null) root = 'web'; |
| 482 expect(_ports, contains(root)); | 480 expect(_ports, contains(root)); |
| 483 var url = "http://localhost:${_ports[root]}"; | 481 var url = "http://localhost:${_ports[root]}"; |
| 484 if (path != null) url = "$url/$path"; | 482 if (path != null) url = "$url/$path"; |
| 485 return url; | 483 return url; |
| 486 } | 484 } |
| 487 | 485 |
| OLD | NEW |