mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-14 05:34:48 +00:00
26 lines
902 B
C#
26 lines
902 B
C#
namespace ElectronNET.IntegrationTests.Tests
|
|
{
|
|
using ElectronNET.API;
|
|
using ElectronNET.API.Entities;
|
|
using ElectronNET.IntegrationTests.Common;
|
|
|
|
[Collection("ElectronCollection")]
|
|
public class BrowserViewTests : IntegrationTestBase
|
|
{
|
|
public BrowserViewTests(ElectronFixture fx) : base(fx)
|
|
{
|
|
}
|
|
|
|
[IntegrationFact]
|
|
public async Task Create_browser_view_and_adjust_bounds()
|
|
{
|
|
var view = await Electron.WindowManager.CreateBrowserViewAsync(new BrowserViewConstructorOptions());
|
|
this.MainWindow.SetBrowserView(view);
|
|
view.Bounds = new Rectangle { X = 0, Y = 0, Width = 300, Height = 200 };
|
|
// Access bounds again (synchronous property fetch)
|
|
var current = view.Bounds;
|
|
current.Width.Should().Be(300);
|
|
current.Height.Should().Be(200);
|
|
}
|
|
}
|
|
} |