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

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

Issue 15567002: Added support for running dart2js tests on android devices (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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
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:io'; 8 import 'dart:io';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import 'dart:uri'; 10 import 'dart:uri';
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 parser.addOption('port', abbr: 'p', 45 parser.addOption('port', abbr: 'p',
46 help: 'The main server port we wish to respond to requests.', 46 help: 'The main server port we wish to respond to requests.',
47 defaultsTo: '0'); 47 defaultsTo: '0');
48 parser.addOption('crossOriginPort', abbr: 'c', 48 parser.addOption('crossOriginPort', abbr: 'c',
49 help: 'A different port that accepts request from the main server port.', 49 help: 'A different port that accepts request from the main server port.',
50 defaultsTo: '0'); 50 defaultsTo: '0');
51 parser.addFlag('help', abbr: 'h', negatable: false, 51 parser.addFlag('help', abbr: 'h', negatable: false,
52 help: 'Print this usage information.'); 52 help: 'Print this usage information.');
53 parser.addOption('build-directory', help: 'The build directory to use.'); 53 parser.addOption('build-directory', help: 'The build directory to use.');
54 parser.addOption('network', help: 'The network interface to use.', 54 parser.addOption('network', help: 'The network interface to use.',
55 defaultsTo: '127.0.0.1'); 55 defaultsTo: '0.0.0.0');
56 parser.addFlag('csp', help: 'Use Content Security Policy restrictions.', 56 parser.addFlag('csp', help: 'Use Content Security Policy restrictions.',
57 defaultsTo: false); 57 defaultsTo: false);
58 parser.addOption('runtime', help: 'The runtime we are using (for csp flags).', 58 parser.addOption('runtime', help: 'The runtime we are using (for csp flags).',
59 defaultsTo: 'none'); 59 defaultsTo: 'none');
60 60
61 var args = parser.parse(new Options().arguments); 61 var args = parser.parse(new Options().arguments);
62 if (args['help']) { 62 if (args['help']) {
63 print(parser.getUsage()); 63 print(parser.getUsage());
64 } else { 64 } else {
65 // Pretend we're running test.dart so that TestUtils doesn't get confused 65 // Pretend we're running test.dart so that TestUtils doesn't get confused
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 class _Entry { 369 class _Entry {
370 final String name; 370 final String name;
371 final String displayName; 371 final String displayName;
372 372
373 _Entry(this.name, this.displayName); 373 _Entry(this.name, this.displayName);
374 374
375 int compareTo(_Entry other) { 375 int compareTo(_Entry other) {
376 return name.compareTo(other.name); 376 return name.compareTo(other.name);
377 } 377 }
378 } 378 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698