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

Test the "fully active" check for requestFullscreen() #5901

Merged
merged 2 commits into from
May 15, 2017

Conversation

foolip
Copy link
Member

@foolip foolip commented May 12, 2017

@w3c-bots
Copy link

w3c-bots commented May 12, 2017

View the complete job log.

Firefox (nightly)

Testing web-platform-tests at revision 93d2c64
Using browser at version BuildID 20170514100406; SourceStamp 73b3fc64525b6816842c737e104ef2ac5482d217
Starting 10 test iterations
All results were stable

All results

1 test ran
/fullscreen/api/element-request-fullscreen-active-document.html
Subtest Results Messages
OK
Element#requestFullscreen() when the document is not the active document FAIL assert_unreached: fullscreenerror event Reached unreachable code

@w3c-bots
Copy link

w3c-bots commented May 12, 2017

View the complete job log.

Chrome (unstable)

Testing web-platform-tests at revision 93d2c64
Using browser at version 60.0.3095.5 dev
Starting 10 test iterations
All results were stable

All results

1 test ran
/fullscreen/api/element-request-fullscreen-active-document.html
Subtest Results Messages
OK
Element#requestFullscreen() when the document is not the active document FAIL documentBeforeNav.documentElement.requestFullscreen is not a function

@foolip foolip requested a review from upsuper May 12, 2017 10:59
Promise.resolve().then(t.step_func(() => assert_true(rejected)));
}
// Wait two animation frames to ensure that no events are fired. (One should
// be enough per spec, but this makes the test flaky in Firefox.)
Copy link
Member

Choose a reason for hiding this comment

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

If you are concerned about the fullscreen transition... probably you can wait for a second instead I guess.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wasn't concerned with any transition because this is an error case, rather I want to wait just long enough to know that the fullscreenerror event is not fired. Per current spec that should be at the next animation frame, so one rAF should be enough.

I looked into Gecko's code and see that you use AsyncEventDispatcher, which looks like the equivalent of "queue a task to fire an event". I've confirmed that a single setTimeout would make the test fail reliably in Firefox, and that setting the timeout just before the requestFullscreen call makes it pass reliably, so that checks out.

I'll tweak the test to use a mix of rAF and setTimeout to handle either implementation.

foolip added a commit to whatwg/fullscreen that referenced this pull request May 15, 2017
@foolip foolip merged commit dcb1462 into master May 15, 2017
@foolip foolip deleted the fullscreen-request-active branch May 15, 2017 09:57
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