Skip to content

Commit 4ee11aa

Browse files
committed
removing properties
1 parent 7c39d28 commit 4ee11aa

2 files changed

Lines changed: 0 additions & 101 deletions

File tree

src/ElectronNET.API/API/WebContents.cs

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -315,39 +315,6 @@ public void InsertCSS(bool isBrowserWindow, string path)
315315
BridgeConnector.Socket.Emit("webContents-insertCSS", Id, isBrowserWindow, path);
316316
}
317317

318-
/// <summary>
319-
/// A number property that determines the zoom level for this web contents.
320-
///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.
321-
///The formula for this is scale := 1.2 ^ level.
322-
/// </summary>
323-
public int ZoomLevel
324-
{
325-
get
326-
{
327-
return Task.Run(() => this.InvokeAsync<int>()).Result;
328-
}
329-
set
330-
{
331-
BridgeConnector.Socket.Emit("webContents-zoomLevel-set", Id, value);
332-
}
333-
}
334-
335-
/// <summary>
336-
/// A number property that determines the zoom factor for this web contents.
337-
///The zoom factor is the zoom percent divided by 100, so 300% = 3.0.
338-
/// </summary>
339-
public double ZoomFactor
340-
{
341-
get
342-
{
343-
return Task.Run(() => this.InvokeAsync<double>()).Result;
344-
}
345-
set
346-
{
347-
BridgeConnector.Socket.Emit("webContents-zoomFactor-set", Id, value);
348-
}
349-
}
350-
351318
/// <summary>
352319
/// Returns number - The current zoom factor.
353320
/// </summary>
@@ -396,21 +363,6 @@ public Task SetVisualZoomLevelLimitsAsync(int minimumLevel, int maximumLevel)
396363
return tcs.Task;
397364
}
398365

399-
/// <summary>
400-
/// A boolean property that determines whether this page is muted.
401-
/// </summary>
402-
public bool AudioMuted
403-
{
404-
get
405-
{
406-
return Task.Run(() => this.InvokeAsync<bool>()).Result;
407-
}
408-
set
409-
{
410-
BridgeConnector.Socket.Emit("webContents-audioMuted-set", Id, value);
411-
}
412-
}
413-
414366
/// <summary>
415367
/// Returns boolean - Whether this page has been muted.
416368
/// </summary>
@@ -432,21 +384,6 @@ public void SetAudioMuted(bool muted)
432384
BridgeConnector.Socket.Emit("webContents-setAudioMuted", Id, muted);
433385
}
434386

435-
/// <summary>
436-
/// A string property that determines the user agent for this web page.
437-
/// </summary>
438-
public string UserAgent
439-
{
440-
get
441-
{
442-
return Task.Run(() => this.InvokeAsync<string>()).Result;
443-
}
444-
set
445-
{
446-
BridgeConnector.Socket.Emit("webContents-userAgent-set", Id, value);
447-
}
448-
}
449-
450387
/// <summary>
451388
/// Returns string - The user agent for this web page.
452389
/// </summary>

src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,6 @@ public async Task GetSetZoomFactor_check()
9494
ok.Should().Be(2.0);
9595
}
9696

97-
[Fact(Timeout = 20000)]
98-
public async Task ZoomFactorProperty_check()
99-
{
100-
var ok = fx.MainWindow.WebContents.ZoomFactor;
101-
ok.Should().Be(1.0);
102-
fx.MainWindow.WebContents.ZoomFactor = 2.0;
103-
ok = fx.MainWindow.WebContents.ZoomFactor;
104-
ok.Should().Be(2.0);
105-
}
106-
10797
[SkippableFact(Timeout = 20000)]
10898
public async Task GetSetZoomLevel_check()
10999
{
@@ -117,16 +107,6 @@ public async Task GetSetZoomLevel_check()
117107
ok.Should().Be(2);
118108
}
119109

120-
[Fact(Timeout = 20000)]
121-
public async Task ZoomLevelProperty_check()
122-
{
123-
var ok = fx.MainWindow.WebContents.ZoomLevel;
124-
ok.Should().Be(0);
125-
fx.MainWindow.WebContents.ZoomLevel = 2;
126-
ok = fx.MainWindow.WebContents.ZoomLevel;
127-
ok.Should().Be(2);
128-
}
129-
130110
[SkippableFact(Timeout = 20000)]
131111
public async Task DevTools_check()
132112
{
@@ -161,15 +141,6 @@ public async Task GetSetAudioMuted_check()
161141
ok.Should().BeFalse();
162142
}
163143

164-
[SkippableFact(Timeout = 20000)]
165-
public async Task AudioMutedProperty_check()
166-
{
167-
Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Skipping test on Windows CI.");
168-
fx.MainWindow.WebContents.AudioMuted.Should().BeFalse();
169-
fx.MainWindow.WebContents.AudioMuted = true;
170-
fx.MainWindow.WebContents.AudioMuted.Should().BeTrue();
171-
}
172-
173144
[SkippableFact(Timeout = 20000)]
174145
public async Task GetSetUserAgent_check()
175146
{
@@ -182,14 +153,5 @@ public async Task GetSetUserAgent_check()
182153
ok.Should().Be("MyUserAgent/1.0");
183154
}
184155

185-
[SkippableFact(Timeout = 20000)]
186-
public async Task UserAgentProperty_check()
187-
{
188-
Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Skipping test on Windows CI.");
189-
fx.MainWindow.WebContents.UserAgent.Should().NotBeNullOrEmpty();
190-
fx.MainWindow.WebContents.UserAgent = "MyUserAgent/1.0";
191-
fx.MainWindow.WebContents.UserAgent.Should().Be("MyUserAgent/1.0");
192-
}
193-
194156
}
195157
}

0 commit comments

Comments
 (0)