Skip to content

fix: client bugs found by the upstream test ports - #2063

Open
Yury Semikhatsky (yury-s) wants to merge 5 commits into
microsoft:mainfrom
yury-s:fix-fixme-client-bugs
Open

Yury Semikhatsky (yury-s) wants to merge 5 commits into
microsoft:mainfrom
yury-s:fix-fixme-client-bugs

Conversation

@yury-s

Copy link
Copy Markdown
Member

Summary

  • fix 13 bugs of the client that the ported upstream tests carried a @Fixme("java: ...") for: route handler removed by another handler, null header values in route.resume()/route.fallback(), page.video() without recordVideo, typed arrays in evaluate() results, the pseudo option of hasCSS, console events of a worker, and others (see the first commit)
  • route.abort(), route.resume() and route.fulfill() wait for the reply of the driver and report its error, as in the Node.js client
  • remove the 18 @Fixme marks of the tests that pass now

- skip a route handler that another handler removed
- a null header value in route.resume() and route.fallback() deletes the header
- route.fulfill() marks the route as handled after the options are validated
- Request.timing().responseStart of a response without one is responseEnd
- page.video() is null when the context does not record video
- storageState(path) writes indented JSON
- APIRequestContext.dispose() of a disposed context does not throw
- typed arrays in evaluate() results
- the pseudo option of hasCSS
- subscribe to console events of a worker
- selectOption() rejects a null item
- response.finished() of a request without a page
- an empty string with a JSON content type is stringified
The call reports the error of the driver, and the route is marked as handled when the call succeeds, as in the Node.js client. The call returns without an error when the page closes first.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a point in updating the old code before it gets deleted. The Python migration never attempted to pass the new tests with the old implementation:

  • old impl passed old tests
  • new impl passed both old and new tests


// java: pumps the connection until the reply arrives; when the page closes first the call returns
// without an error, as safeRace() of the target closed scope does upstream.
private void raceWithTargetClose(String method, Object params) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you'll need a more generic solution for the line-by-line port later on.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants