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

testdriver.js: Make set_permission() take a PermissionDescriptor, not a name #20674

Conversation

rakuco
Copy link
Member

@rakuco rakuco commented Dec 9, 2019

Making the public API take a permission name only works for permissions that
take a PermissionDescriptor, and makes it impossible to set permissions
that require extra information (i.e. they take a MidiPermissionDescriptor
or a PushPermissionDescriptor instead).

Instead of taking a string corresponding to a permission name, take a
PermissionDescriptor directly so that all required information can be
specified.

While here, make set_permission.html an HTTPS test, as some permissions
are only available in a secure context (such as "push", which is being used
to test setting a permission that requires extra parameters in the
descriptor).

Fixes #20672.

… a name

Making the public API take a permission name only works for permissions that
take a `PermissionDescriptor`, and makes it impossible to set permissions
that require extra information (i.e. they take a `MidiPermissionDescriptor`
or a `PushPermissionDescriptor` instead).

Instead of taking a string corresponding to a permission name, take a
`PermissionDescriptor` directly so that all required information can be
specified.

While here, make `set_permission.html` an HTTPS test, as some permissions
are only available in a secure context (such as "push", which is being used
to test setting a permission that requires extra parameters in the
descriptor).

Fixes web-platform-tests#20672.
@rakuco rakuco force-pushed the testdriver-set_permission-descriptor branch from 9a540cd to 5cb79c7 Compare December 9, 2019 10:41
@rakuco
Copy link
Member Author

rakuco commented Dec 9, 2019

The TaskCluster failures seem to be a result of a lot of tests running for more than 2h.

Copy link
Contributor

@LukeZielinski LukeZielinski left a comment

Choose a reason for hiding this comment

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

Thanks, seems like a good compromise between test ergo and functionality.

@rakuco
Copy link
Member Author

rakuco commented Dec 9, 2019

@foolip et al: I think I need a hand force-merging this PR, the TaskCluster failures seem to be unrelated.

@gsnedders gsnedders closed this Dec 9, 2019
@gsnedders gsnedders reopened this Dec 9, 2019
@gsnedders
Copy link
Member

Oh, no, this is just #15485.

@gsnedders gsnedders merged commit 43df68b into web-platform-tests:master Dec 9, 2019
@rakuco
Copy link
Member Author

rakuco commented Dec 9, 2019

Thanks, @gsnedders!

@rakuco rakuco deleted the testdriver-set_permission-descriptor branch December 9, 2019 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra testdriver.js wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_driver.set_permission() needs to take a descriptor, not a permission name
6 participants