@@ -24,7 +24,7 @@ Future<void> _waitForPageReady(TestContext context) async {
2424 while (attempt-- > 0 ) {
2525 final content = await context.webDriver.pageSource;
2626 if (content.contains ('hello_world' )) return ;
27- await Future .delayed (const Duration (milliseconds: 100 ));
27+ await Future < void > .delayed (const Duration (milliseconds: 100 ));
2828 }
2929 throw StateError ('Page never initialized' );
3030}
@@ -51,7 +51,7 @@ void main() {
5151 'd' ,
5252 ]);
5353 // Wait for DevTools to actually open.
54- await Future .delayed (const Duration (seconds: 2 ));
54+ await Future < void > .delayed (const Duration (seconds: 2 ));
5555 });
5656
5757 tearDown (() async {
@@ -75,7 +75,7 @@ void main() {
7575 "window.open('$appUrl ', '_blank');" ,
7676 [],
7777 );
78- await Future .delayed (const Duration (seconds: 2 ));
78+ await Future < void > .delayed (const Duration (seconds: 2 ));
7979 final newAppWindow = await context.webDriver.windows.last;
8080 await newAppWindow.setAsActive ();
8181
@@ -87,7 +87,7 @@ void main() {
8787 Keyboard .alt,
8888 'd' ,
8989 ]);
90- await Future .delayed (const Duration (seconds: 2 ));
90+ await Future < void > .delayed (const Duration (seconds: 2 ));
9191 final alert = context.webDriver.driver.switchTo.alert;
9292 expect (alert, isNotNull);
9393 expect (
@@ -109,7 +109,7 @@ void main() {
109109 Keyboard .alt,
110110 'd' ,
111111 ]);
112- await Future .delayed (const Duration (seconds: 2 ));
112+ await Future < void > .delayed (const Duration (seconds: 2 ));
113113 windows = await context.webDriver.windows.toList ();
114114 final devToolsWindow = windows.firstWhere (
115115 (window) => window != newAppWindow,
@@ -178,7 +178,7 @@ void main() {
178178 test ('gives a good error if devtools is not served' , () async {
179179 // Try to open devtools and check for the alert.
180180 await context.webDriver.driver.keyboard.sendChord ([Keyboard .alt, 'd' ]);
181- await Future .delayed (const Duration (seconds: 2 ));
181+ await Future < void > .delayed (const Duration (seconds: 2 ));
182182 final alert = context.webDriver.driver.switchTo.alert;
183183 expect (alert, isNotNull);
184184 expect (await alert.text, contains ('--debug' ));
@@ -208,7 +208,7 @@ void main() {
208208 });
209209 // Try to open devtools and check for the alert.
210210 await context.webDriver.driver.keyboard.sendChord ([Keyboard .alt, 'd' ]);
211- await Future .delayed (const Duration (seconds: 2 ));
211+ await Future < void > .delayed (const Duration (seconds: 2 ));
212212 final alert = context.webDriver.driver.switchTo.alert;
213213 expect (alert, isNotNull);
214214 expect (await alert.text, contains ('--debug' ));
0 commit comments