File tree 6 files changed +29
-16
lines changed
6 files changed +29
-16
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ namespace OpenQA.Selenium.BiDi.Communication.Json;
41
41
[ JsonSerializable ( typeof ( Modules . Script . ObjectRemoteValue ) ) ]
42
42
[ JsonSerializable ( typeof ( Modules . Script . FunctionRemoteValue ) ) ]
43
43
[ JsonSerializable ( typeof ( Modules . Script . RegExpRemoteValue ) ) ]
44
- [ JsonSerializable ( typeof ( Modules . Script . RegExpRemoteValue . RegExpValue ) , TypeInfoPropertyName = "Script_RegExpRemoteValue_RegExpValue" ) ]
45
44
[ JsonSerializable ( typeof ( Modules . Script . DateRemoteValue ) ) ]
46
45
[ JsonSerializable ( typeof ( Modules . Script . MapRemoteValue ) ) ]
47
46
[ JsonSerializable ( typeof ( Modules . Script . SetRemoteValue ) ) ]
Original file line number Diff line number Diff line change @@ -112,12 +112,6 @@ public record MapLocalValue(IEnumerable<IEnumerable<LocalValue>> Value) : LocalV
112
112
113
113
public record ObjectLocalValue ( IEnumerable < IEnumerable < LocalValue > > Value ) : LocalValue ;
114
114
115
- public record RegExpLocalValue ( RegExpLocalValue . RegExpValue Value ) : LocalValue
116
- {
117
- public record RegExpValue ( string Pattern )
118
- {
119
- public string ? Flags { get ; set ; }
120
- }
121
- }
115
+ public record RegExpLocalValue ( RegExpValue Value ) : LocalValue ;
122
116
123
117
public record SetLocalValue ( IEnumerable < LocalValue > Value ) : LocalValue ;
Original file line number Diff line number Diff line change
1
+ // <copyright file="RegExpValue.cs" company="Selenium Committers">
2
+ // Licensed to the Software Freedom Conservancy (SFC) under one
3
+ // or more contributor license agreements. See the NOTICE file
4
+ // distributed with this work for additional information
5
+ // regarding copyright ownership. The SFC licenses this file
6
+ // to you under the Apache License, Version 2.0 (the
7
+ // "License"); you may not use this file except in compliance
8
+ // with the License. You may obtain a copy of the License at
9
+ //
10
+ // http://www.apache.org/licenses/LICENSE-2.0
11
+ //
12
+ // Unless required by applicable law or agreed to in writing,
13
+ // software distributed under the License is distributed on an
14
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ // KIND, either express or implied. See the License for the
16
+ // specific language governing permissions and limitations
17
+ // under the License.
18
+ // </copyright>
19
+
20
+ namespace OpenQA . Selenium . BiDi . Modules . Script ;
21
+
22
+ public record RegExpValue ( string Pattern )
23
+ {
24
+ public string ? Flags { get ; set ; }
25
+ }
Original file line number Diff line number Diff line change @@ -141,16 +141,11 @@ public record FunctionRemoteValue : RemoteValue
141
141
public InternalId ? InternalId { get ; set ; }
142
142
}
143
143
144
- public record RegExpRemoteValue ( RegExpRemoteValue . RegExpValue Value ) : RemoteValue
144
+ public record RegExpRemoteValue ( RegExpValue Value ) : RemoteValue
145
145
{
146
146
public Handle ? Handle { get ; set ; }
147
147
148
148
public InternalId ? InternalId { get ; set ; }
149
-
150
- public record RegExpValue ( string Pattern )
151
- {
152
- public string ? Flags { get ; set ; }
153
- }
154
149
}
155
150
156
151
public record DateRemoteValue ( string Value ) : RemoteValue
Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ await context.Script.CallFunctionAsync($$"""
281
281
[ Test ]
282
282
public void CanCallFunctionWithArgumentRegExp ( )
283
283
{
284
- var arg = new RegExpLocalValue ( new RegExpLocalValue . RegExpValue ( "foo*" ) { Flags = "g" } ) ;
284
+ var arg = new RegExpLocalValue ( new RegExpValue ( "foo*" ) { Flags = "g" } ) ;
285
285
286
286
Assert . That ( async ( ) =>
287
287
{
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ public async Task CanCallFunctionAndReturnRegExp()
177
177
var response = await context . Script . CallFunctionAsync ( "() => { return /foo*/g; }" , false ) ;
178
178
179
179
Assert . That ( response . Result , Is . AssignableTo < RegExpRemoteValue > ( ) ) ;
180
- Assert . That ( response . Result , Is . EqualTo ( new RegExpRemoteValue ( new RegExpRemoteValue . RegExpValue ( "foo*" ) { Flags = "g" } ) ) ) ;
180
+ Assert . That ( response . Result , Is . EqualTo ( new RegExpRemoteValue ( new RegExpValue ( "foo*" ) { Flags = "g" } ) ) ) ;
181
181
}
182
182
183
183
[ Test ]
You can’t perform that action at this time.
0 commit comments