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

Side by Side Diff: tools/testing/dart/lib/http_server.dart

Issue 841193003: cleanup to tools/testing/dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: one last bit Created 5 years, 11 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
« no previous file with comments | « tools/testing/dart/lib/html_test.dart ('k') | tools/testing/dart/lib/launch_browser.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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:convert' show HtmlEscape;
8 import 'dart:io'; 9 import 'dart:io';
9 10
10 import 'dart:convert' show 11 import '../vendored_pkg/args/args.dart';
11 HtmlEscape;
12 12
13 import 'path.dart'; 13 import 'path.dart';
14 import 'test_suite.dart'; // For TestUtils. 14 import 'test_utils.dart';
15 // TODO(efortuna): Rewrite to not use the args library and simply take an
16 // expected number of arguments, so test.dart doesn't rely on the args library?
17 // See discussion on https://codereview.chromium.org/11931025/.
18 import 'vendored_pkg/args/args.dart';
19 import 'utils.dart'; 15 import 'utils.dart';
20 16
21 class DispatchingServer { 17 class DispatchingServer {
22 HttpServer server; 18 HttpServer server;
23 Map<String, Function> _handlers = new Map<String, Function>(); 19 Map<String, Function> _handlers = new Map<String, Function>();
24 Function _notFound; 20 Function _notFound;
25 21
26 DispatchingServer(this.server, 22 DispatchingServer(this.server,
27 void onError(e), 23 void onError(e),
28 void this._notFound(HttpRequest request)) { 24 void this._notFound(HttpRequest request)) {
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 class _Entry implements Comparable { 452 class _Entry implements Comparable {
457 final String name; 453 final String name;
458 final String displayName; 454 final String displayName;
459 455
460 _Entry(this.name, this.displayName); 456 _Entry(this.name, this.displayName);
461 457
462 int compareTo(_Entry other) { 458 int compareTo(_Entry other) {
463 return name.compareTo(other.name); 459 return name.compareTo(other.name);
464 } 460 }
465 } 461 }
OLDNEW
« no previous file with comments | « tools/testing/dart/lib/html_test.dart ('k') | tools/testing/dart/lib/launch_browser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698