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

Unified Diff: dart/tools/testing/dart/http_server.dart

Issue 11961017: Make test.dart self-contained again. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: dart/tools/testing/dart/http_server.dart
diff --git a/dart/tools/testing/dart/http_server.dart b/dart/tools/testing/dart/http_server.dart
index a4091f63f45f080057dda8ccb51beb8ece101391..db2d04642c28395ccf0eaf0b6eba7ebd8aae325e 100644
--- a/dart/tools/testing/dart/http_server.dart
+++ b/dart/tools/testing/dart/http_server.dart
@@ -7,50 +7,7 @@ library http_server;
import 'dart:io';
import 'dart:isolate';
import 'test_suite.dart'; // For TestUtils.
-import '../../../pkg/args/lib/args.dart';
Mads Ager (google) 2013/01/16 14:23:04 This is a shame, we should work to reenable it. Ma
-main() {
- /** Convenience method for local testing. */
- var parser = new ArgParser();
- parser.addOption('port', abbr: 'p',
- help: 'The main server port we wish to respond to requests.',
- defaultsTo: '0');
- parser.addOption('crossOriginPort', abbr: 'c',
- help: 'A different port that accepts request from the main server port.',
- defaultsTo: '0');
- parser.addOption('mode', abbr: 'm', help: 'Testing mode.',
- defaultsTo: 'release');
- parser.addOption('arch', abbr: 'a', help: 'Testing architecture.',
- defaultsTo: 'ia32');
- parser.addFlag('help', abbr: 'h', negatable: false,
- help: 'Print this usage information.');
- var args = parser.parse(new Options().arguments);
- if (args['help']) {
- print(parser.getUsage());
- } else {
- // Pretend we're running test.dart so that TestUtils doesn't get confused
- // about the "current directory." This is only used if we're trying to run
- // this file independently for local testing.
- TestUtils.testScriptPath = new Path(new Options().script)
- .directoryPath
- .join(new Path('../../test.dart'))
- .canonicalize()
- .toNativePath();
- TestingServerRunner.setPackageRootDir({'mode': args['mode'],
- 'arch': args['arch'], 'system': Platform.operatingSystem,
- 'build_directory': ''});
-
- TestingServerRunner.startHttpServer('127.0.0.1',
- port: int.parse(args['port']));
- print('Server listening on port '
- '${TestingServerRunner.serverList[0].port}.');
- TestingServerRunner.startHttpServer('127.0.0.1',
- allowedPort: TestingServerRunner.serverList[0].port, port:
- int.parse(args['crossOriginPort']));
- print(
- 'Server listening on port ${TestingServerRunner.serverList[1].port}.');
- }
-}
/**
* Runs a set of servers that are initialized specifically for the needs of our
* test framework, such as dealing with package-root.
« no previous file with comments | « no previous file | dart/tools/testing/dart/temp_package_root/path/path.dart » ('j') | dart/tools/testing/dart/test_suite.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698