mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 19:25:01 +00:00
a51da76ad9
- Defaults to true - For those using CaptureScreenshotAsync set to false to avoid creating DefaultRenderHandler
31 lines
797 B
C#
31 lines
797 B
C#
// Copyright © 2021 The CefSharp Authors. All rights reserved.
|
|
//
|
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
|
|
|
using System.Threading.Tasks;
|
|
using CefSharp.Example;
|
|
using CefSharp.OffScreen;
|
|
using Xunit;
|
|
|
|
namespace CefSharp.Test
|
|
{
|
|
public class ChromiumWebBrowserOffScreenFixture : IAsyncLifetime
|
|
{
|
|
public ChromiumWebBrowser Browser { get; private set; }
|
|
|
|
Task IAsyncLifetime.DisposeAsync()
|
|
{
|
|
Browser?.Dispose();
|
|
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
Task IAsyncLifetime.InitializeAsync()
|
|
{
|
|
Browser = new ChromiumWebBrowser(CefExample.HelloWorldUrl, useLegacyRenderHandler: false);
|
|
|
|
return Browser.WaitForInitialLoadAsync();
|
|
}
|
|
}
|
|
}
|