File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
src/org/openqa/grid/selenium/node
test/org/openqa/grid/selenium/node Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public ImmutableCapabilities apply(ImmutableCapabilities capabilities) {
57
57
options .putAll (asMap );
58
58
}
59
59
60
- if (!( options .get ("binary" ) instanceof String ) ) {
60
+ if (options .get ("binary" ) == null && config . getCapability ( "chrome_binary" ) != null ) {
61
61
options .put ("binary" , config .getCapability ("chrome_binary" ));
62
62
}
63
63
Original file line number Diff line number Diff line change 18
18
package org .openqa .grid .selenium .node ;
19
19
20
20
import static org .junit .Assert .assertEquals ;
21
+ import static org .junit .Assert .assertFalse ;
21
22
import static org .junit .Assert .assertSame ;
22
23
import static org .openqa .selenium .chrome .ChromeOptions .CAPABILITY ;
23
24
@@ -70,6 +71,18 @@ public void shouldInjectBinaryIfNotSpecified() {
70
71
defaultConfig .getCapability ("chrome_binary" ));
71
72
}
72
73
74
+ @ Test
75
+ public void shouldNotInjectNullBinary () {
76
+ ImmutableCapabilities caps = new ImmutableCapabilities (new ChromeOptions ());
77
+ ImmutableCapabilities seen = new ChromeMutator (
78
+ new ImmutableCapabilities ("browserName" , "chrome" )).apply (caps );
79
+
80
+ @ SuppressWarnings ("unchecked" )
81
+ Map <String , Object > options = (Map <String , Object >) seen .getCapability (CAPABILITY );
82
+
83
+ assertFalse (options .containsKey ("binary" ));
84
+ }
85
+
73
86
@ Test
74
87
public void shouldNotInjectBinaryIfSpecified () {
75
88
ImmutableCapabilities caps = new ImmutableCapabilities (new ChromeOptions ().setBinary ("cheese" ));
You can’t perform that action at this time.
0 commit comments