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

HTML: test queueing behavior of window.close() #15649

Merged
merged 4 commits into from
Mar 8, 2019

Conversation

annevk
Copy link
Member

@annevk annevk commented Mar 4, 2019

The reason the second test fails in Firefox is due to window.open() using a nested event loop. I could make Firefox pass the test by removing the openee.opener assert, but seems bad?

@annevk

This comment has been minimized.

@annevk
Copy link
Member Author

annevk commented Mar 7, 2019

annevk added a commit to whatwg/html that referenced this pull request Mar 7, 2019
close() needed to queue a task to close, though closed needs to immediately know when close() is invoked too.

Tests: web-platform-tests/wpt#15561 & web-platform-tests/wpt#15649.

Fixes #4405. Helps with #4363.
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

I think it's worth trying to use events instead of timeouts, if we can.

html/browsers/the-window-object/close-method.window.js Outdated Show resolved Hide resolved
html/browsers/the-window-object/close-method.window.js Outdated Show resolved Hide resolved
html/browsers/the-window-object/close-method.window.js Outdated Show resolved Hide resolved
@annevk
Copy link
Member Author

annevk commented Mar 7, 2019

Thanks, events do indeed work due to this being same-origin.

@annevk
Copy link
Member Author

annevk commented Mar 7, 2019

Safari bug is referenced from whatwg/html#4402.

@annevk annevk merged commit bdb6041 into master Mar 8, 2019
@annevk annevk deleted the annevk/window-close-take-2 branch March 8, 2019 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants