webdriver icon indicating copy to clipboard operation
webdriver copied to clipboard

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

Open gsnedders opened this issue 5 years ago • 1 comments

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 avatar Oct 01 '20 16:10 gsnedders

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.

gsnedders avatar Oct 02 '20 17:10 gsnedders