@@ -76,20 +76,20 @@ abstract class Browser {
7676 ///
7777 /// This will fire once the process has started successfully.
7878 Future <Process > get _process => _processCompleter.future;
79- final _processCompleter = Completer <Process >();
79+ final Completer < Process > _processCompleter = Completer <Process >();
8080
8181 /// Whether [close] has been called.
82- var _closed = false ;
82+ bool _closed = false ;
8383
8484 /// A future that completes when the browser exits.
8585 ///
8686 /// If there's a problem starting or running the browser, this will complete
8787 /// with an error.
8888 Future <void > get onExit => _onExitCompleter.future;
89- final _onExitCompleter = Completer <void >();
89+ final Completer < void > _onExitCompleter = Completer <void >();
9090
9191 /// Standard IO streams for the underlying browser process.
92- final _ioSubscriptions = < StreamSubscription > [];
92+ final List < StreamSubscription < void >> _ioSubscriptions = < StreamSubscription < void > > [];
9393
9494 /// Creates a new browser.
9595 ///
@@ -102,10 +102,10 @@ abstract class Browser {
102102 // for the process to actually start. They should just wait for the HTTP
103103 // request instead.
104104 runZonedGuarded (() async {
105- var process = await startBrowser ();
105+ Process process = await startBrowser ();
106106 _processCompleter.complete (process);
107107
108- var output = Uint8Buffer ();
108+ Uint8Buffer output = Uint8Buffer ();
109109 void drainOutput (Stream <List <int >> stream) {
110110 try {
111111 _ioSubscriptions
@@ -117,7 +117,7 @@ abstract class Browser {
117117 drainOutput (process.stdout);
118118 drainOutput (process.stderr);
119119
120- var exitCode = await process.exitCode;
120+ int exitCode = await process.exitCode;
121121
122122 // This hack dodges an otherwise intractable race condition. When the user
123123 // presses Control-C, the signal is sent to the browser and the test
@@ -134,8 +134,8 @@ abstract class Browser {
134134 }
135135
136136 if (! _closed && exitCode != 0 ) {
137- var outputString = utf8.decode (output);
138- var message = '$name failed with exit code $exitCode .' ;
137+ String outputString = utf8.decode (output);
138+ String message = '$name failed with exit code $exitCode .' ;
139139 if (outputString.isNotEmpty) {
140140 message += '\n Standard output:\n $outputString ' ;
141141 }
@@ -151,7 +151,7 @@ abstract class Browser {
151151 }
152152
153153 // Make sure the process dies even if the error wasn't fatal.
154- _process.then ((process) => process.kill ());
154+ _process.then ((Process process) => process.kill ());
155155
156156 if (stackTrace == null ) {
157157 stackTrace = Trace .current ();
@@ -170,13 +170,13 @@ abstract class Browser {
170170 ///
171171 /// Returns the same [Future] as [onExit] , except that it won't emit
172172 /// exceptions.
173- Future close () async {
173+ Future < void > close () async {
174174 _closed = true ;
175175
176176 // If we don't manually close the stream the test runner can hang.
177177 // For example this happens with Chrome Headless.
178178 // See SDK issue: https://github.com/dart-lang/sdk/issues/31264
179- for (var stream in _ioSubscriptions) {
179+ for (StreamSubscription < void > stream in _ioSubscriptions) {
180180 unawaited (stream.cancel ());
181181 }
182182
@@ -192,7 +192,7 @@ abstract class ScreenshotManager {
192192 /// Capture a screenshot.
193193 ///
194194 /// Please read the details for the implementing classes.
195- Future <Image > capture (math.Rectangle region);
195+ Future <Image > capture (math.Rectangle < num > region);
196196
197197 /// Suffix to be added to the end of the filename.
198198 ///
0 commit comments