@@ -87,27 +87,27 @@ type Routes map[string]*Host
87
87
88
88
type caps map [string ]interface {}
89
89
90
- func (c caps ) capabilities (fn func (m map [string ]interface {}, w3c bool )) {
90
+ func (c caps ) capabilities (fn func (m map [string ]interface {}, w3c bool , extension bool )) {
91
91
if desiredCapabilities , ok := c [keys .desiredCapabilities ]; ok {
92
92
if m , ok := desiredCapabilities .(map [string ]interface {}); ok {
93
- fn (m , false )
93
+ fn (m , false , false )
94
94
}
95
95
}
96
96
if w3cCapabilities , ok := c [keys .w3cCapabilities ]; ok {
97
97
if m , ok := w3cCapabilities .(map [string ]interface {}); ok {
98
98
if alwaysMatch , ok := m [keys .alwaysMatch ]; ok {
99
99
if m , ok := alwaysMatch .(map [string ]interface {}); ok {
100
- fn (m , true )
100
+ fn (m , true , false )
101
101
for k , v := range m { // Extension capabilities have ":" in key
102
102
if ec , ok := v .(map [string ]interface {}); ok && strings .Contains (k , ":" ) {
103
- fn (ec , true )
103
+ fn (ec , true , true )
104
104
}
105
105
}
106
106
}
107
107
}
108
108
}
109
109
} else {
110
- fn (make (map [string ]interface {}), false )
110
+ fn (make (map [string ]interface {}), false , false )
111
111
}
112
112
}
113
113
@@ -117,7 +117,7 @@ func (c caps) capability(k string) string {
117
117
118
118
func (c caps ) capabilityJsonWireW3C (jsonWire , W3C string ) string {
119
119
result := ""
120
- c .capabilities (func (m map [string ]interface {}, w3c bool ) {
120
+ c .capabilities (func (m map [string ]interface {}, w3c bool , _ bool ) {
121
121
k := jsonWire
122
122
if w3c {
123
123
k = W3C
@@ -162,7 +162,10 @@ func (c caps) labels() string {
162
162
}
163
163
164
164
func (c caps ) setVersion (version string ) {
165
- c .capabilities (func (m map [string ]interface {}, w3c bool ) {
165
+ c .capabilities (func (m map [string ]interface {}, w3c bool , extension bool ) {
166
+ if extension {
167
+ return
168
+ }
166
169
if w3c {
167
170
m ["browserVersion" ] = version
168
171
} else {
0 commit comments