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

Side by Side Diff: lib/src/runner/browser/server.dart

Issue 1636933002: Fix --pub-serve's path separator on Windows. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:convert'; 6 import 'dart:convert';
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:async/async.dart'; 9 import 'package:async/async.dart';
10 import 'package:http_multi_server/http_multi_server.dart'; 10 import 'package:http_multi_server/http_multi_server.dart';
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 !new File(htmlPath).readAsStringSync() 212 !new File(htmlPath).readAsStringSync()
213 .contains('packages/test/dart.js')) { 213 .contains('packages/test/dart.js')) {
214 throw new LoadException( 214 throw new LoadException(
215 path, 215 path,
216 '"${htmlPath}" must contain <script src="packages/test/dart.js">' 216 '"${htmlPath}" must contain <script src="packages/test/dart.js">'
217 '</script>.'); 217 '</script>.');
218 } 218 }
219 219
220 var suiteUrl; 220 var suiteUrl;
221 if (_config.pubServeUrl != null) { 221 if (_config.pubServeUrl != null) {
222 var suitePrefix = p.withoutExtension( 222 var suitePrefix = p.toUri(p.withoutExtension(
223 p.relative(path, from: p.join(_root, 'test'))); 223 p.relative(path, from: p.join(_root, 'test')))).path;
224 224
225 var dartUrl; 225 var dartUrl;
226 // Polymer generates a bootstrap entrypoint that wraps the entrypoint we 226 // Polymer generates a bootstrap entrypoint that wraps the entrypoint we
227 // see on disk, and modifies the HTML file to point to the bootstrap 227 // see on disk, and modifies the HTML file to point to the bootstrap
228 // instead. To make sure we get the right source maps and wait for the 228 // instead. To make sure we get the right source maps and wait for the
229 // right file to compile, we have some Polymer-specific logic here to load 229 // right file to compile, we have some Polymer-specific logic here to load
230 // the boostrap instead of the unwrapped file. 230 // the boostrap instead of the unwrapped file.
231 if (isPolymerEntrypoint(path)) { 231 if (isPolymerEntrypoint(path)) {
232 dartUrl = _config.pubServeUrl.resolve( 232 dartUrl = _config.pubServeUrl.resolve(
233 "$suitePrefix.html.polymer.bootstrap.dart.browser_test.dart"); 233 "$suitePrefix.html.polymer.bootstrap.dart.browser_test.dart");
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 await Future.wait(futures); 404 await Future.wait(futures);
405 405
406 if (_config.pubServeUrl == null) { 406 if (_config.pubServeUrl == null) {
407 new Directory(_compiledDir).deleteSync(recursive: true); 407 new Directory(_compiledDir).deleteSync(recursive: true);
408 } else { 408 } else {
409 _http.close(); 409 _http.close();
410 } 410 }
411 }); 411 });
412 } 412 }
413 } 413 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698