Skip to content

Commit df4ba2e

Browse files
committed
Tests - EvaluateScriptAsyncTests.ShouldCancelAfterV8ContextChange add delay
- Add a delay before trying to execute the callback to allow for the message to arrive from the render process
1 parent 017876e commit df4ba2e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

CefSharp.Test/Javascript/EvaluateScriptAsyncTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ public async Task ShouldCancelAfterV8ContextChange()
5656
// change V8 context
5757
await browser.LoadUrlAsync(CefExample.HelloWorldUrl);
5858

59+
// Wait for 100ms so the message from the render process has time to arrive, this
60+
// wasn't previously nessicary, timing is different starting in M146
61+
await Task.Delay(100);
62+
5963
await Assert.ThrowsAsync<TaskCanceledException>(() => evaluateCancelAfterV8ContextChangeTask);
6064

6165
evaluateCancelAfterDisposeTask = browser.EvaluateScriptAsync("new Promise(resolve => setTimeout(resolve, 1000))");

0 commit comments

Comments
 (0)