File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ public static class TaskHelper
1616 /// <exception cref="TimeoutException"></exception>
1717 public static async Task CreateTimeoutTask ( int timeout )
1818 {
19- var wrapper = new TaskCompletionSource < bool > ( ) ;
20-
2119 if ( timeout == 0 )
2220 {
2321 await Task . Delay ( - 1 ) . ConfigureAwait ( false ) ;
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ internal class NavigatorWatcher : IDisposable
1717 [ WaitUntilNavigation . Networkidle0 ] = "networkIdle" ,
1818 [ WaitUntilNavigation . Networkidle2 ] = "networkAlmostIdle"
1919 } ;
20+ private static readonly WaitUntilNavigation [ ] _defaultWaitUntil = new [ ] { WaitUntilNavigation . Load } ;
2021
2122 private readonly IConnection _connection ;
2223 private readonly NetworkManager _networkManager ;
@@ -39,7 +40,7 @@ public NavigatorWatcher(
3940 int timeout ,
4041 NavigationOptions options )
4142 {
42- var waitUntil = new [ ] { WaitUntilNavigation . Load } ;
43+ var waitUntil = _defaultWaitUntil ;
4344
4445 if ( options ? . WaitUntil != null )
4546 {
You can’t perform that action at this time.
0 commit comments