Skip to content

Assert that an unnecessary exitFullscreen()'s promise is resolved#5872

Merged
foolip merged 1 commit into
masterfrom
fullscreen-double-exit-promise
May 11, 2017
Merged

Assert that an unnecessary exitFullscreen()'s promise is resolved#5872
foolip merged 1 commit into
masterfrom
fullscreen-double-exit-promise

Conversation

@foolip

@foolip foolip commented May 10, 2017

Copy link
Copy Markdown
Member

This is a test for whatwg/fullscreen#81

@wpt-pr-bot

Copy link
Copy Markdown
Collaborator

Notifying owners who are not repo collaborators: @aliams, @jernoble, and @upsuper.

foolip added a commit to whatwg/fullscreen that referenced this pull request May 10, 2017
Given that there is an "unfullscreen a document" operation, this
algorithm can easily be assumed to be the set of documents for which
that should be called, i.e., that all of the documents returned will
exit fully.

At the beginning of the animation frame task there's no guarantee that
doc still has a fullscreen element, but later in "unfullscreen exitDoc's
fullscreen element" it is assumed to have one. Fix this with an early
return.

Test: web-platform-tests/wpt#5872
@foolip

foolip commented May 10, 2017

Copy link
Copy Markdown
Member Author

Nobody implements promises yet, so this test deliberately doesn't fail if so. I've verified that the test still passes in Firefox with the changes, but beyond that the test may need tweaking once promises are supported. This is the only way that the change in whatwg/fullscreen#81 would be observable.

@ghost

ghost commented May 10, 2017

Copy link
Copy Markdown

View the complete job log.

Firefox (nightly)

Testing web-platform-tests at revision 0da3aff
Using browser at version BuildID 20170509100208; SourceStamp b21b974d60d3075ae24f6fb1bae75d0f122f28fc
Starting 10 test iterations
No tests run.

@ghost

ghost commented May 10, 2017

Copy link
Copy Markdown

View the complete job log.

Chrome (unstable)

Testing web-platform-tests at revision 0da3aff
Using browser at version 60.0.3088.3 dev
Starting 10 test iterations
No tests run.

foolip added a commit to whatwg/fullscreen that referenced this pull request May 11, 2017
Given that there is an "unfullscreen a document" operation, this
algorithm can easily be assumed to be the set of documents for which
that should be called, i.e., that all of the documents returned will
exit fully.

At the beginning of the animation frame task there's no guarantee that
doc still has a fullscreen element, but later in "unfullscreen exitDoc's
fullscreen element" it is assumed to have one. Fix this with an early
return.

Test: web-platform-tests/wpt#5872
@upsuper

upsuper commented May 11, 2017

Copy link
Copy Markdown
Member

I think this is fine.

@foolip foolip merged commit 1f854d8 into master May 11, 2017
@foolip foolip deleted the fullscreen-double-exit-promise branch May 11, 2017 07:47
@foolip

foolip commented May 11, 2017

Copy link
Copy Markdown
Member Author

Thanks @upsuper!

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.

3 participants