Skip to content

Commit

Permalink
DanielWagnerHall: Adding equals and hashCode to ChromeOptions
Browse files Browse the repository at this point in the history
r18409
  • Loading branch information
illicitonion committed Jan 8, 2013
1 parent 00eda2a commit bd93364
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions java/client/src/org/openqa/selenium/chrome/ChromeOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
Expand Down Expand Up @@ -200,4 +201,21 @@ DesiredCapabilities toCapabilities() {

return capabilities;
}

@Override
public boolean equals(Object other) {
if (!(other instanceof ChromeOptions)) {
return false;
}
ChromeOptions that = (ChromeOptions) other;
return Objects.equal(this.binary, that.binary)
&& Objects.equal(this.args, that.args)
&& Objects.equal(this.extensionFiles, that.extensionFiles)
&& Objects.equal(this.experimentalOptions, that.experimentalOptions);
}

@Override
public int hashCode() {
return Objects.hashCode(this.binary, this.args, this.extensionFiles, this.experimentalOptions);
}
}

0 comments on commit bd93364

Please sign in to comment.