Open sadym-chromium opened 5 months ago
I think WPT was the right place for the issue. I am in favor of using Undefined and None as used in browsingContext.setViewport. Alternatively, we could also add a Null type to be used in tests to reflect the CDDL type.
I think WPT was the right place for the issue.
According to @jgraham the issue better suits this repo.
Hm, but what should we define in the BiDi spec? Any code change has to be made in wpt anyway. And Undefined
in the spec is represented by the optional (?
) field. Or what do I miss?
I don't think there is an action point for the spec as well.
The proposal is only about WPT tests
I think this is the right discussion venue because it's a WG decision about test style, not a test infra decision. Not all issues here have to result in spec changes, but we might, for example, decide to document the agreed best practice in a readme.
Beside the discussion where the actual discussion should happen I would also vote for a constant style across all of our tests.
The Browser Testing and Tools Working Group just discussed WPT use Undefined to signal missing param
.
Moved from https://github.com/web-platform-tests/wpt/issues/44068
The current WebDriver BiDi WPT tests use
None
to represent two distinct cases for parameters:This overloaded use of
None
can cause confusion and hinder testing scenarios where we need to pass an explicitnull
value.Example:
bidi_session.browsing_context.set_viewport
with missingviewport
.Proposal:
Undefined
to specifically indicate that a parameter should be missing. Use valueNone
to specify the parameter should be present with the valuenull
.None
in existing tests (where it is used to represent missing parameters) and replace it withUndefined
.Advantages: