-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create interfaces for RemoteWebDriver to use with Augmenter #9856
Conversation
2fda026
to
37a3b75
Compare
c0bee02
to
d706012
Compare
java/src/org/openqa/selenium/chromium/AddHasNetworkConditions.java
Outdated
Show resolved
Hide resolved
java/src/org/openqa/selenium/chromium/AddHasNetworkConditions.java
Outdated
Show resolved
Hide resolved
java/test/org/openqa/selenium/edge/EdgeDriverFunctionalTest.java
Outdated
Show resolved
Hide resolved
java/test/org/openqa/selenium/edge/EdgeDriverFunctionalTest.java
Outdated
Show resolved
Hide resolved
java/test/org/openqa/selenium/edge/EdgeDriverFunctionalTest.java
Outdated
Show resolved
Hide resolved
I marked all the conversations as resolved for the things I fixed in the most recent commit. These others seem slightly more involved, but I'll see what I can make of them tonight so we can discuss tomorrow. |
…Driver via Augmenter
…teWebDriver via Augmenter
… have the same conventions. Complete JavaDocs in interface, ImmutableMap.of for all maps, Require.nonNull in all interface implementations, etc
df133e9
to
2ace4ca
Compare
SonarCloud Quality Gate failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in, and then we can iterate on the nits.
@Override | ||
public HasCasting getImplementation(Capabilities capabilities, ExecuteMethod executeMethod) { | ||
return new HasCasting() { | ||
@Override public List<Map<String, String>> getCastSinks() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: put the @Override
on its own line. What you've got here compiles, but it's not the style we follow on the project.
|
||
|
||
private static final Map<String, CommandInfo> COMMANDS = ImmutableMap.of( | ||
GET_NETWORK_CONDITIONS, new CommandInfo("/session/:sessionId/chromium/network_conditions",HttpMethod.GET), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: a space after the ,
-> ", HttpMethod.GET)
* @param parameters any information needed to execute the Dev Tools command. | ||
* @return the name and value of the response. | ||
*/ | ||
public Map<String, Object> executeCdpCommand(String commandName, Map<String, Object> parameters); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Methods on interfaces are public by default.
This is similar to what we did for the Firefox capabilities, but I'm implementing, but I'm not sure this is the best way to do this (i.e. with the
ChromiumNetworkConditions
class). Would be a lot simpler to do ordered parameters, but this lets users only specify the things they care about.Edit: I'm just going to add everything here to get feedback on it all.