Skip to content

Commit b13ae71

Browse files
committed
Remove JSON enum string changes
1 parent e95a4fd commit b13ae71

20 files changed

+1
-79
lines changed

dotnet/src/webdriver/BiDi/Communication/Broker.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ internal Broker(BiDi bidi, ITransport transport)
8282
new PrintPageRangeConverter(),
8383
new InputOriginConverter(),
8484
new SubscriptionConverter(),
85+
new JsonStringEnumConverter(JsonNamingPolicy.CamelCase),
8586

8687
// https://github.com/dotnet/runtime/issues/72604
8788
new Json.Converters.Polymorphic.MessageConverter(),

dotnet/src/webdriver/BiDi/Communication/Json/Converters/CamelCaseJsonEnumStringConverter.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

dotnet/src/webdriver/BiDi/Modules/Browser/BrowserModule.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using System.Collections.Generic;
2120
using System.Threading.Tasks;
2221
using OpenQA.Selenium.BiDi.Communication;
2322

dotnet/src/webdriver/BiDi/Modules/Browser/ClientWindowInfo.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
2120
using System.Text.Json.Serialization;
2221

2322
namespace OpenQA.Selenium.BiDi.Modules.Browser;
2423

2524
public record ClientWindowInfo([property: JsonPropertyName("active")] bool IsActive, ClientWindow ClientWindow, ClientWindowState State, int Height, int Width, int X, int Y);
2625

27-
[JsonConverter(typeof(CamelCaseJsonEnumStringConverter<ClientWindowState>))]
2826
public enum ClientWindowState
2927
{
3028
Fullscreen,

dotnet/src/webdriver/BiDi/Modules/BrowsingContext/CaptureScreenshotCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
// </copyright>
1919

2020
using OpenQA.Selenium.BiDi.Communication;
21-
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
2221
using System.Text.Json.Serialization;
2322

2423
namespace OpenQA.Selenium.BiDi.Modules.BrowsingContext;
@@ -37,7 +36,6 @@ public record CaptureScreenshotOptions : CommandOptions
3736
public ClipRectangle? Clip { get; set; }
3837
}
3938

40-
[JsonConverter(typeof(CamelCaseJsonEnumStringConverter<Origin>))]
4139
public enum Origin
4240
{
4341
Viewport,

dotnet/src/webdriver/BiDi/Modules/BrowsingContext/CreateCommand.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
// </copyright>
1919

2020
using OpenQA.Selenium.BiDi.Communication;
21-
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
22-
using System.Text.Json.Serialization;
2321

2422
namespace OpenQA.Selenium.BiDi.Modules.BrowsingContext;
2523

@@ -37,7 +35,6 @@ public record CreateOptions : CommandOptions
3735
public Browser.UserContext? UserContext { get; set; }
3836
}
3937

40-
[JsonConverter(typeof(CamelCaseJsonEnumStringConverter<ContextType>))]
4138
public enum ContextType
4239
{
4340
Tab,

dotnet/src/webdriver/BiDi/Modules/BrowsingContext/Locator.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
2120
using System.Text.Json.Serialization;
2221

2322
namespace OpenQA.Selenium.BiDi.Modules.BrowsingContext;
@@ -52,7 +51,6 @@ public record InnerText(string Value) : Locator
5251
public record XPath(string Value) : Locator;
5352
}
5453

55-
[JsonConverter(typeof(CamelCaseJsonEnumStringConverter<MatchType>))]
5654
public enum MatchType
5755
{
5856
Full,

dotnet/src/webdriver/BiDi/Modules/BrowsingContext/NavigateCommand.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
// </copyright>
1919

2020
using OpenQA.Selenium.BiDi.Communication;
21-
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
22-
using System.Text.Json.Serialization;
2321

2422
namespace OpenQA.Selenium.BiDi.Modules.BrowsingContext;
2523

@@ -33,7 +31,6 @@ public record NavigateOptions : CommandOptions
3331
public ReadinessState? Wait { get; set; }
3432
}
3533

36-
[JsonConverter(typeof(CamelCaseJsonEnumStringConverter<ReadinessState>))]
3734
public enum ReadinessState
3835
{
3936
None,

dotnet/src/webdriver/BiDi/Modules/BrowsingContext/PrintCommand.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818
// </copyright>
1919

2020
using OpenQA.Selenium.BiDi.Communication;
21-
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
2221
using System;
2322
using System.Collections.Generic;
24-
using System.Text.Json.Serialization;
2523

2624
namespace OpenQA.Selenium.BiDi.Modules.BrowsingContext;
2725

@@ -58,7 +56,6 @@ public struct PrintMargin
5856
public double? Top { get; set; }
5957
}
6058

61-
[JsonConverter(typeof(CamelCaseJsonEnumStringConverter<PrintOrientation>))]
6259
public enum PrintOrientation
6360
{
6461
Portrait,

dotnet/src/webdriver/BiDi/Modules/BrowsingContext/UserPromptOpenedEventArgs.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
2120
using System.Text.Json.Serialization;
2221

2322
namespace OpenQA.Selenium.BiDi.Modules.BrowsingContext;
@@ -29,7 +28,6 @@ public record UserPromptOpenedEventArgs(BiDi BiDi, BrowsingContext Context, User
2928
public string? DefaultValue { get; internal set; }
3029
}
3130

32-
[JsonConverter(typeof(CamelCaseJsonEnumStringConverter<UserPromptType>))]
3331
public enum UserPromptType
3432
{
3533
Alert,

0 commit comments

Comments
 (0)