Launch DevTools from pub instead of devtools_server (#71737)

* Launch DevTools from pub instead of devtools_server
This commit is contained in:
Kenzie Schmoll
2020-12-14 10:12:42 -08:00
committed by GitHub
parent f35238c804
commit cd452286ab
10 changed files with 284 additions and 76 deletions

View File

@@ -118,16 +118,12 @@ class _FakeProcess implements Process {
_FakeProcess(
this._exitCode,
Duration duration,
VoidCallback onRun,
this.pid,
this._stderr,
this.stdin,
this._stdout,
this._completer,
) : exitCode = Future<void>.delayed(duration).then((void value) {
if (onRun != null) {
onRun();
}
if (_completer != null) {
return _completer.future.then((void _) => _exitCode);
}
@@ -231,10 +227,12 @@ abstract class FakeProcessManager implements ProcessManager {
) {
_pid += 1;
final FakeCommand fakeCommand = findCommand(command, workingDirectory, environment, encoding);
if (fakeCommand.onRun != null) {
fakeCommand.onRun();
}
return _FakeProcess(
fakeCommand.exitCode,
fakeCommand.duration,
fakeCommand.onRun,
_pid,
fakeCommand.stderr,
fakeCommand.stdin,