| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_configurations; | 5 library test_configurations; |
| 6 | 6 |
| 7 import "dart:async"; | 7 import "dart:async"; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import "dart:math" as math; | 9 import "dart:math" as math; |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 125 } |
| 126 for (var conf in configurations) { | 126 for (var conf in configurations) { |
| 127 Map<String, RegExp> selectors = conf['selectors']; | 127 Map<String, RegExp> selectors = conf['selectors']; |
| 128 var useContentSecurityPolicy = conf['csp']; | 128 var useContentSecurityPolicy = conf['csp']; |
| 129 if (!listTests && runningBrowserTests) { | 129 if (!listTests && runningBrowserTests) { |
| 130 // Start global http servers that serve the entire dart repo. | 130 // Start global http servers that serve the entire dart repo. |
| 131 // The http server is available on window.location.port, and a second | 131 // The http server is available on window.location.port, and a second |
| 132 // server for cross-domain tests can be found by calling | 132 // server for cross-domain tests can be found by calling |
| 133 // getCrossOriginPortNumber(). | 133 // getCrossOriginPortNumber(). |
| 134 var servers = new TestingServers( | 134 var servers = new TestingServers( |
| 135 new Path(TestUtils.buildDir(conf)), | 135 TestUtils.buildDir(conf), |
| 136 useContentSecurityPolicy, | 136 useContentSecurityPolicy, |
| 137 conf['runtime'], | 137 conf['runtime'], |
| 138 null, | 138 null, |
| 139 conf['package_root']); | 139 conf['package_root'], |
| 140 conf['packages']); |
| 140 serverFutures.add(servers.startServers(conf['local_ip'], | 141 serverFutures.add(servers.startServers(conf['local_ip'], |
| 141 port: conf['test_server_port'], | 142 port: conf['test_server_port'], |
| 142 crossOriginPort: conf['test_server_cross_origin_port'])); | 143 crossOriginPort: conf['test_server_cross_origin_port'])); |
| 143 conf['_servers_'] = servers; | 144 conf['_servers_'] = servers; |
| 144 if (verbose) { | 145 if (verbose) { |
| 145 serverFutures.last.then((_) { | 146 serverFutures.last.then((_) { |
| 146 var commandline = servers.httpServerCommandline(); | 147 var commandline = servers.httpServerCommandline(); |
| 147 print('Started HttpServers: $commandline'); | 148 print('Started HttpServers: $commandline'); |
| 148 }); | 149 }); |
| 149 } | 150 } |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 maxBrowserProcesses, | 305 maxBrowserProcesses, |
| 305 startTime, | 306 startTime, |
| 306 testSuites, | 307 testSuites, |
| 307 eventListener, | 308 eventListener, |
| 308 allTestsFinished, | 309 allTestsFinished, |
| 309 verbose, | 310 verbose, |
| 310 recordingPath, | 311 recordingPath, |
| 311 recordingOutputPath, | 312 recordingOutputPath, |
| 312 adbDevicePool); | 313 adbDevicePool); |
| 313 } | 314 } |
| OLD | NEW |