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

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

Issue 1829533002: Drop the crypto dependency. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 9 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/utils.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 return new BrowserPlatform._(server, config, root: root); 42 return new BrowserPlatform._(server, config, root: root);
43 } 43 }
44 44
45 /// The underlying server. 45 /// The underlying server.
46 final shelf.Server _server; 46 final shelf.Server _server;
47 47
48 /// A randomly-generated secret. 48 /// A randomly-generated secret.
49 /// 49 ///
50 /// This is used to ensure that other users on the same system can't snoop 50 /// This is used to ensure that other users on the same system can't snoop
51 /// on data being served through this server. 51 /// on data being served through this server.
52 final _secret = randomBase64(24, urlSafe: true); 52 final _secret = Uri.encodeComponent(randomBase64(24));
53 53
54 /// The URL for this server. 54 /// The URL for this server.
55 Uri get url => _server.url.resolve(_secret + "/"); 55 Uri get url => _server.url.resolve(_secret + "/");
56 56
57 /// The test runner configuration. 57 /// The test runner configuration.
58 Configuration _config; 58 Configuration _config;
59 59
60 /// A [OneOffHandler] for servicing WebSocket connections for 60 /// A [OneOffHandler] for servicing WebSocket connections for
61 /// [BrowserManager]s. 61 /// [BrowserManager]s.
62 /// 62 ///
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 await Future.wait(futures); 422 await Future.wait(futures);
423 423
424 if (_config.pubServeUrl == null) { 424 if (_config.pubServeUrl == null) {
425 new Directory(_compiledDir).deleteSync(recursive: true); 425 new Directory(_compiledDir).deleteSync(recursive: true);
426 } else { 426 } else {
427 _http.close(); 427 _http.close();
428 } 428 }
429 }); 429 });
430 final _closeMemo = new AsyncMemoizer(); 430 final _closeMemo = new AsyncMemoizer();
431 } 431 }
OLDNEW
« no previous file with comments | « no previous file | lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698