Skip to content

Commit

Permalink
[dotnet] update devtools tests to use V93
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Sep 22, 2021
1 parent b4f8e9f commit f610af6
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 135 deletions.
4 changes: 2 additions & 2 deletions dotnet/test/common/DevTools/DevToolsConsoleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ public class DevToolsConsoleTest : DevToolsTestFixture
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task VerifyMessageAdded()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
string consoleMessage = "Hello Selenium";

ManualResetEventSlim sync = new ManualResetEventSlim(false);
EventHandler<V91.Console.MessageAddedEventArgs> messageAddedHandler = (sender, e) =>
EventHandler<V93.Console.MessageAddedEventArgs> messageAddedHandler = (sender, e) =>
{
Assert.That(e.Message.Text, Is.EqualTo(consoleMessage));
sync.Set();
Expand Down
6 changes: 3 additions & 3 deletions dotnet/test/common/DevTools/DevToolsLogTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public class DevToolsLogTest : DevToolsTestFixture
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task VerifyEntryAddedAndClearLog()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
ManualResetEventSlim sync = new ManualResetEventSlim(false);
EventHandler<V91.Log.EntryAddedEventArgs> entryAddedHandler = (sender, e) =>
EventHandler<V93.Log.EntryAddedEventArgs> entryAddedHandler = (sender, e) =>
{
Assert.That(e.Entry.Text.Contains("404"));
Assert.That(e.Entry.Level == V91.Log.LogEntryLevelValues.Error);
Assert.That(e.Entry.Level == V93.Log.LogEntryLevelValues.Error);
sync.Set();
};

Expand Down
152 changes: 76 additions & 76 deletions dotnet/test/common/DevTools/DevToolsNetworkTest.cs

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions dotnet/test/common/DevTools/DevToolsPerformanceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public class DevToolsPerformanceTest : DevToolsTestFixture
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task EnableAndDisablePerformance()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
await domains.Performance.Enable(new V91.Performance.EnableCommandSettings());
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
await domains.Performance.Enable(new V93.Performance.EnableCommandSettings());
driver.Url = simpleTestPage;
await domains.Performance.Disable();
}
Expand All @@ -31,7 +31,7 @@ public async Task EnableAndDisablePerformance()
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task DisablePerformance()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
await domains.Performance.Disable();
driver.Url = simpleTestPage;
await domains.Performance.Disable();
Expand All @@ -44,13 +44,13 @@ public async Task DisablePerformance()
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task SetTimeDomainTimeTickPerformance()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
await domains.Performance.Disable();
await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommandSettings()
await domains.Performance.SetTimeDomain(new V93.Performance.SetTimeDomainCommandSettings()
{
TimeDomain = "timeTicks"
});
await domains.Performance.Enable(new V91.Performance.EnableCommandSettings());
await domains.Performance.Enable(new V93.Performance.EnableCommandSettings());
driver.Url = simpleTestPage;
await domains.Performance.Disable();
}
Expand All @@ -62,13 +62,13 @@ await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommand
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task SetTimeDomainsThreadTicksPerformance()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
await domains.Performance.Disable();
await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommandSettings()
await domains.Performance.SetTimeDomain(new V93.Performance.SetTimeDomainCommandSettings()
{
TimeDomain = "threadTicks"
});
await domains.Performance.Enable(new V91.Performance.EnableCommandSettings());
await domains.Performance.Enable(new V93.Performance.EnableCommandSettings());
driver.Url = simpleTestPage;
await domains.Performance.Disable();
}
Expand All @@ -80,12 +80,12 @@ await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommand
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task GetMetricsByTimeTicks()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommandSettings()
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
await domains.Performance.SetTimeDomain(new V93.Performance.SetTimeDomainCommandSettings()
{
TimeDomain = "timeTicks"
});
await domains.Performance.Enable(new V91.Performance.EnableCommandSettings());
await domains.Performance.Enable(new V93.Performance.EnableCommandSettings());
driver.Url = simpleTestPage;
var response = await domains.Performance.GetMetrics();
var metrics = response.Metrics;
Expand All @@ -101,12 +101,12 @@ await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommand
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task GetMetricsByThreadTicks()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommandSettings()
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
await domains.Performance.SetTimeDomain(new V93.Performance.SetTimeDomainCommandSettings()
{
TimeDomain = "threadTicks"
});
await domains.Performance.Enable(new V91.Performance.EnableCommandSettings());
await domains.Performance.Enable(new V93.Performance.EnableCommandSettings());
driver.Url = simpleTestPage;
var response = await domains.Performance.GetMetrics();
var metrics = response.Metrics;
Expand Down
18 changes: 9 additions & 9 deletions dotnet/test/common/DevTools/DevToolsProfilerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class DevToolsProfilerTest : DevToolsTestFixture
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task SimpleStartStopAndGetProfilerTest()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
await domains.Profiler.Enable();
await domains.Profiler.Start();
var response = await domains.Profiler.Stop();
Expand All @@ -34,10 +34,10 @@ public async Task SimpleStartStopAndGetProfilerTest()
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task SampleGetBestEffortProfilerTest()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
await domains.Profiler.Enable();
driver.Url = simpleTestPage;
await domains.Profiler.SetSamplingInterval(new V91.Profiler.SetSamplingIntervalCommandSettings()
await domains.Profiler.SetSamplingInterval(new V93.Profiler.SetSamplingIntervalCommandSettings()
{
Interval = 30
});
Expand All @@ -56,10 +56,10 @@ await domains.Profiler.SetSamplingInterval(new V91.Profiler.SetSamplingIntervalC
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task SampleSetStartPreciseCoverageTest()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
await domains.Profiler.Enable();
driver.Url = simpleTestPage;
await domains.Profiler.StartPreciseCoverage(new V91.Profiler.StartPreciseCoverageCommandSettings()
await domains.Profiler.StartPreciseCoverage(new V93.Profiler.StartPreciseCoverageCommandSettings()
{
CallCount = true,
Detailed = true
Expand All @@ -82,11 +82,11 @@ await domains.Profiler.StartPreciseCoverage(new V91.Profiler.StartPreciseCoverag
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task SampleProfileEvents()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
await domains.Profiler.Enable();
driver.Url = simpleTestPage;
ManualResetEventSlim startSync = new ManualResetEventSlim(false);
EventHandler<V91.Profiler.ConsoleProfileStartedEventArgs> consoleProfileStartedHandler = (sender, e) =>
EventHandler<V93.Profiler.ConsoleProfileStartedEventArgs> consoleProfileStartedHandler = (sender, e) =>
{
Assert.That(e, Is.Not.Null);
startSync.Set();
Expand All @@ -99,7 +99,7 @@ public async Task SampleProfileEvents()
driver.Navigate().Refresh();

ManualResetEventSlim finishSync = new ManualResetEventSlim(false);
EventHandler<V91.Profiler.ConsoleProfileFinishedEventArgs> consoleProfileFinishedHandler = (sender, e) =>
EventHandler<V93.Profiler.ConsoleProfileFinishedEventArgs> consoleProfileFinishedHandler = (sender, e) =>
{
Assert.That(e, Is.Not.Null);
finishSync.Set();
Expand All @@ -115,7 +115,7 @@ public async Task SampleProfileEvents()
await domains.Profiler.Disable();
}

private void ValidateProfile(V91.Profiler.Profile profiler)
private void ValidateProfile(V93.Profiler.Profile profiler)
{
Assert.That(profiler, Is.Not.Null);
Assert.That(profiler.Nodes, Is.Not.Null);
Expand Down
10 changes: 5 additions & 5 deletions dotnet/test/common/DevTools/DevToolsSecurityTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ public class DevToolsSecurityTest : DevToolsTestFixture
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task LoadInsecureWebsite()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
await domains.Security.Enable();

await domains.Security.SetIgnoreCertificateErrors(new V91.Security.SetIgnoreCertificateErrorsCommandSettings()
await domains.Security.SetIgnoreCertificateErrors(new V93.Security.SetIgnoreCertificateErrorsCommandSettings()
{
Ignore = false
});

string summary = null;
ManualResetEventSlim sync = new ManualResetEventSlim(false);
EventHandler<V91.Security.SecurityStateChangedEventArgs> securityStateChangedHandler = (sender, e) =>
EventHandler<V93.Security.SecurityStateChangedEventArgs> securityStateChangedHandler = (sender, e) =>
{
summary = e.Summary;
sync.Set();
Expand All @@ -52,10 +52,10 @@ await domains.Security.SetIgnoreCertificateErrors(new V91.Security.SetIgnoreCert
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
public async Task LoadSecureWebsite()
{
var domains = session.GetVersionSpecificDomains<V91.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<V93.DevToolsSessionDomains>();
await domains.Security.Enable();

await domains.Security.SetIgnoreCertificateErrors(new V91.Security.SetIgnoreCertificateErrorsCommandSettings()
await domains.Security.SetIgnoreCertificateErrors(new V93.Security.SetIgnoreCertificateErrorsCommandSettings()
{
Ignore = true
});
Expand Down
Loading

0 comments on commit f610af6

Please sign in to comment.