removing properties

This commit is contained in:
agracio
2025-12-06 11:58:30 +00:00
parent 7c39d28f81
commit 4ee11aaeae
2 changed files with 0 additions and 101 deletions

View File

@@ -315,39 +315,6 @@ public class WebContents : ApiBase
BridgeConnector.Socket.Emit("webContents-insertCSS", Id, isBrowserWindow, path);
}
/// <summary>
/// A number property that determines the zoom level for this web contents.
///The original size is 0 and each increment above or below represents zooming 20% larger or smaller to default limits of 300% and 50% of original size, respectively.
///The formula for this is scale := 1.2 ^ level.
/// </summary>
public int ZoomLevel
{
get
{
return Task.Run(() => this.InvokeAsync<int>()).Result;
}
set
{
BridgeConnector.Socket.Emit("webContents-zoomLevel-set", Id, value);
}
}
/// <summary>
/// A number property that determines the zoom factor for this web contents.
///The zoom factor is the zoom percent divided by 100, so 300% = 3.0.
/// </summary>
public double ZoomFactor
{
get
{
return Task.Run(() => this.InvokeAsync<double>()).Result;
}
set
{
BridgeConnector.Socket.Emit("webContents-zoomFactor-set", Id, value);
}
}
/// <summary>
/// Returns number - The current zoom factor.
/// </summary>
@@ -396,21 +363,6 @@ public class WebContents : ApiBase
return tcs.Task;
}
/// <summary>
/// A boolean property that determines whether this page is muted.
/// </summary>
public bool AudioMuted
{
get
{
return Task.Run(() => this.InvokeAsync<bool>()).Result;
}
set
{
BridgeConnector.Socket.Emit("webContents-audioMuted-set", Id, value);
}
}
/// <summary>
/// Returns boolean - Whether this page has been muted.
/// </summary>
@@ -432,21 +384,6 @@ public class WebContents : ApiBase
BridgeConnector.Socket.Emit("webContents-setAudioMuted", Id, muted);
}
/// <summary>
/// A string property that determines the user agent for this web page.
/// </summary>
public string UserAgent
{
get
{
return Task.Run(() => this.InvokeAsync<string>()).Result;
}
set
{
BridgeConnector.Socket.Emit("webContents-userAgent-set", Id, value);
}
}
/// <summary>
/// Returns string - The user agent for this web page.
/// </summary>

View File

@@ -94,16 +94,6 @@ namespace ElectronNET.IntegrationTests.Tests
ok.Should().Be(2.0);
}
[Fact(Timeout = 20000)]
public async Task ZoomFactorProperty_check()
{
var ok = fx.MainWindow.WebContents.ZoomFactor;
ok.Should().Be(1.0);
fx.MainWindow.WebContents.ZoomFactor = 2.0;
ok = fx.MainWindow.WebContents.ZoomFactor;
ok.Should().Be(2.0);
}
[SkippableFact(Timeout = 20000)]
public async Task GetSetZoomLevel_check()
{
@@ -117,16 +107,6 @@ namespace ElectronNET.IntegrationTests.Tests
ok.Should().Be(2);
}
[Fact(Timeout = 20000)]
public async Task ZoomLevelProperty_check()
{
var ok = fx.MainWindow.WebContents.ZoomLevel;
ok.Should().Be(0);
fx.MainWindow.WebContents.ZoomLevel = 2;
ok = fx.MainWindow.WebContents.ZoomLevel;
ok.Should().Be(2);
}
[SkippableFact(Timeout = 20000)]
public async Task DevTools_check()
{
@@ -161,15 +141,6 @@ namespace ElectronNET.IntegrationTests.Tests
ok.Should().BeFalse();
}
[SkippableFact(Timeout = 20000)]
public async Task AudioMutedProperty_check()
{
Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Skipping test on Windows CI.");
fx.MainWindow.WebContents.AudioMuted.Should().BeFalse();
fx.MainWindow.WebContents.AudioMuted = true;
fx.MainWindow.WebContents.AudioMuted.Should().BeTrue();
}
[SkippableFact(Timeout = 20000)]
public async Task GetSetUserAgent_check()
{
@@ -182,14 +153,5 @@ namespace ElectronNET.IntegrationTests.Tests
ok.Should().Be("MyUserAgent/1.0");
}
[SkippableFact(Timeout = 20000)]
public async Task UserAgentProperty_check()
{
Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Skipping test on Windows CI.");
fx.MainWindow.WebContents.UserAgent.Should().NotBeNullOrEmpty();
fx.MainWindow.WebContents.UserAgent = "MyUserAgent/1.0";
fx.MainWindow.WebContents.UserAgent.Should().Be("MyUserAgent/1.0");
}
}
}