w3c / webdriver

Remote control interface that enables introspection and control of user agents.
https://w3c.github.io/webdriver/
Other
682 stars 195 forks source link

"New Window" doesn't do any type checking of the "type" argument #1551

Open gsnedders opened 4 years ago

gsnedders commented 4 years ago

Almost all of our uses of "getting the property" are followed by validation, but this case is not.

From IRC:

16:59 < @whimboo> gsnedders: we left it open for possible future types 16:59 < whimboo> to not break backward compat 17:07 < gsnedders> whimboo: wouldn't we expect any future type to also be a string? 17:09 < whimboo> gsnedders: k, that would make sense. can you file a spec issue for that?

Neither GeckoDriver nor SafariDriver allow arbitrary types (GeckoDriver allows null or string, SafariDriver allows string only). @jgraham is in favour of a nullable string type where null chooses an implementation-defined default (we should probably also make sure it's totally clear what happens with any other string).

gsnedders commented 4 years ago

Note that https://github.com/web-platform-tests/wpt/blob/master/webdriver/tests/new_window/new.py already tests this for all these cases, and aside from Safari (and Servo) there appears to be interop on it being a nullable string.