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

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

Issue 12087086: Revert revision 17848 - this is breaking dartium testing (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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
« no previous file with comments | « tools/test-runtime.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/http_server.dart
===================================================================
--- tools/testing/dart/http_server.dart (revision 17849)
+++ tools/testing/dart/http_server.dart (working copy)
@@ -39,11 +39,10 @@
.join(new Path('../../test.dart'))
.canonicalize()
.toNativePath();
- var conf = {'mode': args['mode'],
- 'arch': args['arch'], 'system': Platform.operatingSystem,
- 'build_directory': ''};
- TestingServerRunner.setPackageRootDir(conf);
- TestingServerRunner.setBuildDir(conf);
+ 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 '
@@ -62,22 +61,16 @@
class TestingServerRunner {
static List serverList = [];
static Path _packageRootDir = null;
- static Path _buildDirectory = null;
// Added as a getter so that the function will be called again each time the
// default request handler closure is executed.
static Path get packageRootDir => _packageRootDir;
- static Path get buildDirectory => _buildDirectory;
static setPackageRootDir(Map configuration) {
_packageRootDir = TestUtils.currentWorkingDirectory.join(
new Path(TestUtils.buildDir(configuration)));
}
- static setBuildDir(Map configuration) {
- _buildDirectory = new Path(TestUtils.buildDir(configuration));
- }
-
static startHttpServer(String host, {int allowedPort:-1, int port: 0}) {
var basePath = TestUtils.dartDir();
var httpServer = new HttpServer();
@@ -90,14 +83,7 @@
var requestPath = new Path(request.path.substring(1)).canonicalize();
var path = basePath.join(requestPath);
var file = new File(path.toNativePath());
- // Since the build directory may not be located directly beneath the dart
- // root directory (if we pass it in, e.g., for dartium testing) we serve
- // files from the build directory explicitly. Please note that if
- // buildDirectory has the same name as a directory inside the dart repo
- // we will server files from the buildDirectory.
- if (path.toString().startsWith(buildDirectory.toString())) {
- file = new File(path.toNativePath());
- }
+
if (requestPath.segments().contains(packagesDirName)) {
// Essentially implement the packages path rewriting, so we don't have
// to pass environment variables to the browsers.
« no previous file with comments | « tools/test-runtime.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698