Bug 286763
| Summary: | [WebDriver][BiDi] Add proper session.subscribe and session.unsubscribe parameter checks for events and context | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Lauro Moura <lmoura> |
| Component: | WebDriver | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bburg, hskupin, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 281940 | ||
Lauro Moura
imported/w3c/webdriver/tests/bidi/session/subscribe/invalid.py
imported/w3c/webdriver/tests/bidi/session/unsubscribe/invalid.py
For example, currently we just check if "events" is an array and, for each element get `eventName->asString()`, while the spec expects the name to be actually a string, and a valid module or event name.
Non-Comprehensive list of test cases from wpt:
- Empty parameters should raise InvalidArgument
- Invalid "events" parameter type (i.e. non-array) should raise InvalidArgument
- "events" as an empty array should raise InvalidArgument
- Invalid "events" values types (non-string) should raise InvalidArgument
- "events" values that refer to unknown events should raise InvalidArgument
- Mixing known and unknown events should, not subscribe to the known event
- Raise InvalidArgument
- Invalid "contexts" parameter type (i.e. non-array) should raise InvalidArgument
- "contexts" as an empty array should raise InvalidArgument
- Invalid "context" values types (non-string) should raise InvalidArgument
- Invalid "context" value (e.g. non-existing frame) should raise NoSuchFrame
- Valid event and invalid context should not subscribe to the event, raising NoSuchFrame
- Trying to subscribe to a context of a closed tab should raise NoSuchFrame
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/144324820>