Skip to content

Commit 2c62d0a

Browse files
committed
[rb][bidi] added non-primitive, remote and special number type
1 parent 319e7ed commit 2c62d0a

File tree

3 files changed

+118
-0
lines changed

3 files changed

+118
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# frozen_string_literal: true
2+
3+
# Licensed to the Software Freedom Conservancy (SFC) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The SFC licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
module Selenium
21+
module WebDriver
22+
class BiDi
23+
module NonPrimitiveType
24+
ARRAY = 'array'
25+
DATE = 'date'
26+
MAP = 'map'
27+
OBJECT = 'object'
28+
REGULAR_EXPRESSION = 'regexp'
29+
SET = 'set'
30+
31+
def self.find_by_name(name)
32+
NonPrimitiveType.constants.each do |type|
33+
return true if name.casecmp(type)
34+
end
35+
end
36+
end
37+
end
38+
end
39+
end
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# frozen_string_literal = true
2+
3+
# Licensed to the Software Freedom Conservancy (SFC) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The SFC licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
module Selenium
21+
module WebDriver
22+
class BiDi
23+
module RemoteType
24+
SYMBOL = 'symbol'
25+
FUNCTION = 'function'
26+
WEAK_MAP = 'weakmap'
27+
WEAK_SET = 'weakset'
28+
ITERATOR = 'iterator'
29+
GENERATOR = 'generator'
30+
ERROR = 'error'
31+
PROXY = 'proxy'
32+
PROMISE = 'promise'
33+
TYPED_ARRAY = 'typedarray'
34+
ARRAY_BUFFER = 'arraybuffer'
35+
NODE_LIST = 'nodelist'
36+
HTML_COLLECTION = 'htmlcollection'
37+
NODE = 'node'
38+
WINDOW = 'window'
39+
40+
def self.find_by_name(name)
41+
RemoteType.constants.each do |type|
42+
return true if name.casecmp(type)
43+
end
44+
end
45+
end
46+
end
47+
end
48+
end
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# frozen_string_literal = true
2+
3+
# Licensed to the Software Freedom Conservancy (SFC) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The SFC licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
module Selenium
21+
module WebDriver
22+
class BiDi
23+
module SpecialNumberType
24+
NAN = 'NaN'
25+
MINUS_ZERO = '-0'
26+
INFINITY = 'Infinity'
27+
MINUS_INFINITY = '-Infinity'
28+
end
29+
end
30+
end
31+
end

0 commit comments

Comments
 (0)