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

Add test for screen wake lock on worker #17024

Merged
merged 2 commits into from May 28, 2019

Conversation

Honry
Copy link
Contributor

@Honry Honry commented May 27, 2019

which should not be allowed

which should not be allowed
@Honry
Copy link
Contributor Author

Honry commented May 27, 2019

@rakuco, @kenchris, please also help review this one. Thanks! :)

importScripts("/resources/testharness.js");

promise_test(async t => {
await promise_rejects(t, "NotAllowedError", WakeLock.request('screen'));
Copy link
Member

Choose a reason for hiding this comment

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

I think async and await are unnecessary here: simply returning promise_rejects() also works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. :)

@marcoscaceres
Copy link
Contributor

Approving, but please make the changes suggested by @rakuco 🙏

@marcoscaceres marcoscaceres merged commit a7edbaf into web-platform-tests:master May 28, 2019
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

4 participants