Skip to content

Commit e0dab5a

Browse files
committed
Test - Add OffScreen CanLoadMultipleBrowserInstancesSequentially
Create/Dispose of 1000 OffScreen ChromiumWebBrowser instances Issue #3552
1 parent b8dd8c0 commit e0dab5a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

CefSharp.Test/OffScreen/OffScreenBrowserBasicFacts.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,5 +516,23 @@ await Cef.UIThreadTaskFactory.StartNew(delegate
516516
output.WriteLine("Url {0}", mainFrame.Url);
517517
}
518518
}
519+
520+
#if DEBUG
521+
[Fact]
522+
public async Task CanLoadMultipleBrowserInstancesSequentially()
523+
{
524+
for (int i = 0; i < 1000; i++)
525+
{
526+
using (var browser = new ChromiumWebBrowser(new HtmlString("Testing")))
527+
{
528+
await browser.LoadPageAsync();
529+
530+
var source = await browser.GetSourceAsync();
531+
532+
Assert.True(source.Contains("Testing"));
533+
}
534+
}
535+
}
536+
#endif
519537
}
520538
}

0 commit comments

Comments
 (0)