File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,9 +155,9 @@ public async Task CanTimeout()
155155 }
156156
157157 [ Fact ]
158- public async Task ShouldTimeoutIfNavigationOccurs ( )
158+ public async Task ShouldCancelIfNavigationOccurs ( )
159159 {
160- const string expected = "The operation has timed out ." ;
160+ const string expected = "A task was canceled ." ;
161161 const string url = CefExample . HelloWorldUrl ;
162162
163163 using ( var browser = new ChromiumWebBrowser ( CefExample . DefaultUrl , useLegacyRenderHandler : false ) )
@@ -166,7 +166,7 @@ public async Task ShouldTimeoutIfNavigationOccurs()
166166
167167 Assert . True ( response . Success ) ;
168168
169- var exception = await Assert . ThrowsAnyAsync < TimeoutException > ( async ( ) =>
169+ var exception = await Assert . ThrowsAnyAsync < TaskCanceledException > ( async ( ) =>
170170 {
171171 var navigationTask = browser . WaitForSelectorAsync ( "non-existant" ) ;
172172 var evaluateTask = browser . EvaluateScriptAsync ( $ "setTimeout(() => window.location.href = '{ url } ', 100);") ;
@@ -175,7 +175,6 @@ public async Task ShouldTimeoutIfNavigationOccurs()
175175 } ) ;
176176
177177 Assert . Contains ( expected , exception . Message ) ;
178- Assert . Contains ( url , browser . GetMainFrame ( ) . Url ) ;
179178
180179 output . WriteLine ( "Exception {0}" , exception . Message ) ;
181180 }
You can’t perform that action at this time.
0 commit comments