Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update script result_ownership tests to handle id is only on root #35966

Merged

Conversation

juliandescottes
Copy link
Contributor

Per serialization spec, child ownership is always set to "none" before serializing values. This means that only the root can ever have a handle id set.

Our current tests for resultOwnership="root" assert that a handle is set on the root remote value, but not that nested remote values do not have a handle id.

@sadym-chromium
Copy link
Contributor

The question is do we want to restrict the protocol extensions. And having the nested handlers can be considered as such an extension.


# Regardless of the result_ownership, check that the nested object has no
# handle property.
assert result["value"] == [["a", {"type": "object"}]]
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should better update assert_handle to recursively check that the handle is only part of the root object?

@whimboo
Copy link
Contributor

whimboo commented Sep 20, 2022

CC'ing @jgraham as well.

@juliandescottes
Copy link
Contributor Author

The question is do we want to restrict the protocol extensions. And having the nested handlers can be considered as such an extension.

I imagine this a question about the spec rather than about the test modification? Should we file another issue for that? Otherwise I'm not sure when we need to consider extensions when writing tests?

@juliandescottes
Copy link
Contributor Author

The question is do we want to restrict the protocol extensions. And having the nested handlers can be considered as such an extension.

@sadym-chromium I will file a separate issue for this topic, could we land this change?


# Regardless of the result_ownership, check that the nested object has no
# handle property.
assert result["value"] == [["a", {"type": "object"}]]
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that we want to use assert_handle() here as well.

@juliandescottes
Copy link
Contributor Author

Note: I just rebased for now, will apply comments afterwards.

@juliandescottes
Copy link
Contributor Author

@whimboo I applied the comments, can you take a look?

Copy link
Contributor

@whimboo whimboo left a comment

Choose a reason for hiding this comment

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

That looks much better! @sadym-chromium do you want to have another look again given it has been refactored?

@juliandescottes
Copy link
Contributor Author

Thanks for the review! I can see wpt-chrome-dev-stability is failing, if I understand correctly because of slow tests detected. None of the tests mentioned use the helper which was modified here, so it sounds unlikely that this is related to my patch.

I asked for the task to be re executed.

@whimboo
Copy link
Contributor

whimboo commented Mar 14, 2023

Thanks for the review! I can see wpt-chrome-dev-stability is failing, if I understand correctly because of slow tests detected. None of the tests mentioned use the helper which was modified here, so it sounds unlikely that this is related to my patch.

This task is always failing those days and maybe it needs to be removed if no-one from Google could get it fixed. @sadym-chromium, @foolip any idea what's wrong with it?

@whimboo
Copy link
Contributor

whimboo commented Mar 14, 2023

@jgraham could you please merge this PR? Thanks.

@jgraham jgraham merged commit 4662f28 into web-platform-tests:master Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants