mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-07-08 17:56:51 +00:00
Relax test timings
This commit is contained in:
@@ -266,9 +266,11 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
try
|
||||
{
|
||||
window = await Electron.WindowManager.CreateWindowAsync(
|
||||
new BrowserWindowOptions { Show = false, Width = 300, Height = 200 },
|
||||
new BrowserWindowOptions { Show = true, Width = 300, Height = 200 },
|
||||
"about:blank");
|
||||
|
||||
await Task.Delay(5.seconds());
|
||||
|
||||
var tcs = new TaskCompletionSource<Rectangle>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
window.OnBoundsChanged += bounds => tcs.TrySetResult(bounds);
|
||||
|
||||
|
||||
@@ -174,13 +174,15 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
|
||||
try
|
||||
{
|
||||
await Task.Delay(1.seconds());
|
||||
|
||||
window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = true }, "about:blank");
|
||||
|
||||
await Task.Delay(3.seconds());
|
||||
await Task.Delay(5.seconds());
|
||||
|
||||
window.WebContents.SetUserAgent("MyUserAgent/1.0");
|
||||
|
||||
await Task.Delay(1.seconds());
|
||||
await Task.Delay(2.seconds());
|
||||
|
||||
var ok = await window.WebContents.GetUserAgentAsync();
|
||||
ok.Should().Be("MyUserAgent/1.0");
|
||||
|
||||
Reference in New Issue
Block a user