Chromium Code Reviews| Index: sdk/lib/_internal/pub/test/serve/utils.dart |
| diff --git a/sdk/lib/_internal/pub/test/serve/utils.dart b/sdk/lib/_internal/pub/test/serve/utils.dart |
| index eb412a796750904d53aa3a06e65c95580664d80f..9ff16f4f316d0047e0b9dc52489cdcc199ef94c1 100644 |
| --- a/sdk/lib/_internal/pub/test/serve/utils.dart |
| +++ b/sdk/lib/_internal/pub/test/serve/utils.dart |
| @@ -92,17 +92,15 @@ class DartTransformer extends Transformer { |
| """; |
| } |
| -/// Schedules starting the "pub serve" process. |
| +/// Schedules starting the `pub serve` process. |
| /// |
| -/// If [shouldGetFirst] is `true`, validates that pub get is run first. If |
| -/// [dart2js] is `false`, does not compile Dart entrypoints in "web" to |
| -/// JavaScript. |
| +/// Unlike [pubServe], this doesn't determine the port number of the server, and |
| +/// so may be used to test for errors in the initialization process. |
| /// |
| /// Returns the `pub serve` process. |
| -ScheduledProcess startPubServe({bool shouldGetFirst: false, |
| - Iterable<String> args}) { |
| +ScheduledProcess startPubServe([Iterable<String> args]) { |
| // Use port 0 to get an ephemeral port. |
| - var pubArgs = ["serve", "--port=0", "--hostname=127.0.0.1"]; |
| + var pubArgs = ["serve", "--port=0", "--hostname=127.0.0.1", "--force-poll"]; |
| if (args != null) pubArgs.addAll(args); |
| @@ -110,7 +108,20 @@ ScheduledProcess startPubServe({bool shouldGetFirst: false, |
| // timeout to cope with that. |
| currentSchedule.timeout = new Duration(seconds: 15); |
| - _pubServer = startPub(args: pubArgs); |
| + return startPub(args: pubArgs); |
| +} |
| + |
| +/// Schedules starting the "pub serve" process and records its port number for |
| +/// future requests. |
| +/// |
| +/// If [shouldGetFirst] is `true`, validates that pub get is run first. If |
| +/// [dart2js] is `false`, does not compile Dart entrypoints in "web" to |
|
Bob Nystrom
2013/11/08 01:32:32
Remove bit about dart2js (oops, my fault for leavi
nweiz
2013/11/08 01:44:24
Done.
|
| +/// JavaScript. |
| +/// |
| +/// Returns the `pub serve` process. |
| +ScheduledProcess pubServe({bool shouldGetFirst: false, |
| + Iterable<String> args}) { |
| + _pubServer = startPubServe(args); |
| currentSchedule.onComplete.schedule(() { |
| if (_webSocket != null) { |