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 | 10 import 'dart:convert' show |
11 HtmlEscape; | 11 HtmlEscape; |
12 | 12 |
| 13 import 'path.dart'; |
13 import 'test_suite.dart'; // For TestUtils. | 14 import 'test_suite.dart'; // For TestUtils. |
14 // TODO(efortuna): Rewrite to not use the args library and simply take an | 15 // TODO(efortuna): Rewrite to not use the args library and simply take an |
15 // expected number of arguments, so test.dart doesn't rely on the args library? | 16 // expected number of arguments, so test.dart doesn't rely on the args library? |
16 // See discussion on https://codereview.chromium.org/11931025/. | 17 // See discussion on https://codereview.chromium.org/11931025/. |
17 import 'vendored_pkg/args/args.dart'; | 18 import 'vendored_pkg/args/args.dart'; |
18 import 'utils.dart'; | 19 import 'utils.dart'; |
19 | 20 |
20 class DispatchingServer { | 21 class DispatchingServer { |
21 HttpServer server; | 22 HttpServer server; |
22 Map<String, Function> _handlers = new Map<String, Function>(); | 23 Map<String, Function> _handlers = new Map<String, Function>(); |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 class _Entry implements Comparable { | 456 class _Entry implements Comparable { |
456 final String name; | 457 final String name; |
457 final String displayName; | 458 final String displayName; |
458 | 459 |
459 _Entry(this.name, this.displayName); | 460 _Entry(this.name, this.displayName); |
460 | 461 |
461 int compareTo(_Entry other) { | 462 int compareTo(_Entry other) { |
462 return name.compareTo(other.name); | 463 return name.compareTo(other.name); |
463 } | 464 } |
464 } | 465 } |
OLD | NEW |