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

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

Issue 1101773002: Add Windows support. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Unused import Created 5 years, 8 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 | « lib/src/runner/browser/compiler_pool.dart ('k') | lib/src/runner/loader.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) 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 library test.runner.browser.server; 5 library test.runner.browser.server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 Future _compileSuite(String dartPath) { 324 Future _compileSuite(String dartPath) {
325 return _compileFutures.putIfAbsent(dartPath, () { 325 return _compileFutures.putIfAbsent(dartPath, () {
326 var dir = new Directory(_compiledDir).createTempSync('test_').path; 326 var dir = new Directory(_compiledDir).createTempSync('test_').path;
327 var jsPath = p.join(dir, p.basename(dartPath) + ".js"); 327 var jsPath = p.join(dir, p.basename(dartPath) + ".js");
328 328
329 return _compilers.compile(dartPath, jsPath, packageRoot: _packageRoot) 329 return _compilers.compile(dartPath, jsPath, packageRoot: _packageRoot)
330 .then((_) { 330 .then((_) {
331 if (_closed) return; 331 if (_closed) return;
332 332
333 _jsHandler.add( 333 _jsHandler.add(
334 p.relative(dartPath, from: _root) + '.browser_test.dart.js', 334 p.toUri(p.relative(dartPath, from: _root)).path +
335 '.browser_test.dart.js',
335 (request) { 336 (request) {
336 return new shelf.Response.ok(new File(jsPath).readAsStringSync(), 337 return new shelf.Response.ok(new File(jsPath).readAsStringSync(),
337 headers: {'Content-Type': 'application/javascript'}); 338 headers: {'Content-Type': 'application/javascript'});
338 }); 339 });
339 }); 340 });
340 }); 341 });
341 } 342 }
342 343
343 /// Returns the [BrowserManager] for [platform], which should be a browser. 344 /// Returns the [BrowserManager] for [platform], which should be a browser.
344 /// 345 ///
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 if (_pubServeUrl == null) { 415 if (_pubServeUrl == null) {
415 new Directory(_compiledDir).deleteSync(recursive: true); 416 new Directory(_compiledDir).deleteSync(recursive: true);
416 } else { 417 } else {
417 _http.close(); 418 _http.close();
418 } 419 }
419 420
420 _closeCompleter.complete(); 421 _closeCompleter.complete();
421 }).catchError(_closeCompleter.completeError); 422 }).catchError(_closeCompleter.completeError);
422 } 423 }
423 } 424 }
OLDNEW
« no previous file with comments | « lib/src/runner/browser/compiler_pool.dart ('k') | lib/src/runner/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698