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

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

Issue 2232533002: Rename nestingMiddleware to PathHandler.nestedIn. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 4 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 | lib/src/util/path_handler.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 .add(_jsHandler.handler) 126 .add(_jsHandler.handler)
127 .add(createStaticHandler(_root)) 127 .add(createStaticHandler(_root))
128 .add(_wrapperHandler); 128 .add(_wrapperHandler);
129 129
130 if (config.precompiledPath != null) { 130 if (config.precompiledPath != null) {
131 cascade = cascade.add(createStaticHandler(config.precompiledPath)); 131 cascade = cascade.add(createStaticHandler(config.precompiledPath));
132 } 132 }
133 } 133 }
134 134
135 var pipeline = new shelf.Pipeline() 135 var pipeline = new shelf.Pipeline()
136 .addMiddleware(nestingMiddleware(_secret)) 136 .addMiddleware(PathHandler.nestedIn(_secret))
137 .addHandler(cascade.handler); 137 .addHandler(cascade.handler);
138 138
139 _server.mount(pipeline); 139 _server.mount(pipeline);
140 } 140 }
141 141
142 /// A handler that serves wrapper files used to bootstrap tests. 142 /// A handler that serves wrapper files used to bootstrap tests.
143 shelf.Response _wrapperHandler(shelf.Request request) { 143 shelf.Response _wrapperHandler(shelf.Request request) {
144 var path = p.fromUri(request.url); 144 var path = p.fromUri(request.url);
145 145
146 if (path.endsWith(".browser_test.dart")) { 146 if (path.endsWith(".browser_test.dart")) {
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 await Future.wait(futures); 418 await Future.wait(futures);
419 419
420 if (_config.pubServeUrl == null) { 420 if (_config.pubServeUrl == null) {
421 new Directory(_compiledDir).deleteSync(recursive: true); 421 new Directory(_compiledDir).deleteSync(recursive: true);
422 } else { 422 } else {
423 _http.close(); 423 _http.close();
424 } 424 }
425 }); 425 });
426 final _closeMemo = new AsyncMemoizer(); 426 final _closeMemo = new AsyncMemoizer();
427 } 427 }
OLDNEW
« no previous file with comments | « no previous file | lib/src/util/path_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698