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

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

Issue 1697203002: Switch to downloaded SDK executable, drop executables in testing/bin. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « tools/testing/dart/co19_test.dart ('k') | tools/testing/dart/test_runner.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:io'; 8 import 'dart:io';
9 9
10 import 'dart:convert' show 10 import 'dart:convert' show
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 Future startServers(String host, {int port: 0, int crossOriginPort: 0}) { 165 Future startServers(String host, {int port: 0, int crossOriginPort: 0}) {
166 return _startHttpServer(host, port: port).then((server) { 166 return _startHttpServer(host, port: port).then((server) {
167 _server = server; 167 _server = server;
168 return _startHttpServer(host, 168 return _startHttpServer(host,
169 port: crossOriginPort, 169 port: crossOriginPort,
170 allowedPort:_serverList[0].port); 170 allowedPort:_serverList[0].port);
171 }); 171 });
172 } 172 }
173 173
174 String httpServerCommandline() { 174 String httpServerCommandline() {
175 var dart = TestUtils.dartTestExecutable.toNativePath(); 175 var dart = Platform.resolvedExecutable;
176 var dartDir = TestUtils.dartDir; 176 var dartDir = TestUtils.dartDir;
177 var script = dartDir.join(new Path("tools/testing/dart/http_server.dart")); 177 var script = dartDir.join(new Path("tools/testing/dart/http_server.dart"));
178 var buildDirectory = _buildDirectory.toNativePath(); 178 var buildDirectory = _buildDirectory.toNativePath();
179 var csp = useContentSecurityPolicy ? '--csp ' : ''; 179 var csp = useContentSecurityPolicy ? '--csp ' : '';
180 return '$dart $script -p $port -c $crossOriginPort $csp' 180 return '$dart $script -p $port -c $crossOriginPort $csp'
181 '--build-directory=$buildDirectory --runtime=$runtime ' 181 '--build-directory=$buildDirectory --runtime=$runtime '
182 '--package-root=$_packageRoot'; 182 '--package-root=$_packageRoot';
183 } 183 }
184 184
185 void stopServers() { 185 void stopServers() {
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 class _Entry implements Comparable { 462 class _Entry implements Comparable {
463 final String name; 463 final String name;
464 final String displayName; 464 final String displayName;
465 465
466 _Entry(this.name, this.displayName); 466 _Entry(this.name, this.displayName);
467 467
468 int compareTo(_Entry other) { 468 int compareTo(_Entry other) {
469 return name.compareTo(other.name); 469 return name.compareTo(other.name);
470 } 470 }
471 } 471 }
OLDNEW
« no previous file with comments | « tools/testing/dart/co19_test.dart ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698