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

Screen Wake Lock: Add test for non-fully active doc #45599

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

marcoscaceres
Copy link
Contributor

@marcoscaceres marcoscaceres commented Apr 8, 2024

Copy link
Member

@rakuco rakuco left a comment

Choose a reason for hiding this comment

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

The test looks fine, although it seems to be checking a condition that's already covered by the other ones.

I wonder if it'd be possible to add a test for the new check being added in w3c/screen-wake-lock#367 (i.e. using window_state_context() to change the page visibility after calling request() and verifying the latter fails).

@marcoscaceres
Copy link
Contributor Author

The test looks fine, although it seems to be checking a condition that's already covered by the other ones.

Yeah, you are right... it's a simplified version of the others as it's just a single iframe. I'm ok to keep it though as it could prove useful in case something goes wrong (easier to debug than the other ones).

I wonder if it'd be possible to add a test for the new check being added in w3c/screen-wake-lock#367 (i.e. using window_state_context() to change the page visibility after calling request() and verifying the latter fails).

Yeah, that's a good idea. However, w3c/screen-wake-lock#367 is just dealing with fully active stuff. We should have another test just for testing visibility. We should do that in separate file though, because otherwise (in webkit at least) we wouldn't be able to run this test on iOS devices, because we can't hide windows/tabs in automation on mobile.

@marcoscaceres
Copy link
Contributor Author

Filed w3c/screen-wake-lock#373

@marcoscaceres marcoscaceres enabled auto-merge (squash) April 9, 2024 02:50
@marcoscaceres marcoscaceres merged commit 0b846b5 into master Apr 9, 2024
17 checks passed
@marcoscaceres marcoscaceres deleted the becomes_inactive branch April 9, 2024 03:21
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.

4 participants