OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS 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 http_server; | 5 library http_server; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import 'dart:convert' show HtmlEscape; | 10 import 'dart:convert' show HtmlEscape; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 if (_packages != null) { | 170 if (_packages != null) { |
171 _resolver = await SyncPackageResolver.loadConfig(_packages); | 171 _resolver = await SyncPackageResolver.loadConfig(_packages); |
172 } else { | 172 } else { |
173 _resolver = new SyncPackageResolver.root(_packageRoot); | 173 _resolver = new SyncPackageResolver.root(_packageRoot); |
174 } | 174 } |
175 _server = await _startHttpServer(host, port: port); | 175 _server = await _startHttpServer(host, port: port); |
176 await _startHttpServer(host, | 176 await _startHttpServer(host, |
177 port: crossOriginPort, allowedPort: _serverList[0].port); | 177 port: crossOriginPort, allowedPort: _serverList[0].port); |
178 } | 178 } |
179 | 179 |
180 String httpServerCommandline() { | 180 String httpServerCommandLine() { |
181 var dart = Platform.resolvedExecutable; | 181 var dart = Platform.resolvedExecutable; |
182 var script = _dartDirectory.resolve('tools/testing/dart/http_server.dart'); | 182 var script = _dartDirectory.resolve('tools/testing/dart/http_server.dart'); |
183 var buildDirectory = _buildDirectory.toFilePath(); | 183 var buildDirectory = _buildDirectory.toFilePath(); |
184 var command = [ | 184 var command = [ |
185 dart, | 185 dart, |
186 script.toFilePath(), | 186 script.toFilePath(), |
187 '-p', | 187 '-p', |
188 port, | 188 port, |
189 '-c', | 189 '-c', |
190 crossOriginPort, | 190 crossOriginPort, |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 class _Entry implements Comparable { | 463 class _Entry implements Comparable { |
464 final String name; | 464 final String name; |
465 final String displayName; | 465 final String displayName; |
466 | 466 |
467 _Entry(this.name, this.displayName); | 467 _Entry(this.name, this.displayName); |
468 | 468 |
469 int compareTo(_Entry other) { | 469 int compareTo(_Entry other) { |
470 return name.compareTo(other.name); | 470 return name.compareTo(other.name); |
471 } | 471 } |
472 } | 472 } |
OLD | NEW |