Skip to content

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

Merged
annevk merged 4 commits into
masterfrom
annevk/window-close-take-2
Mar 8, 2019
Merged

annevk merged 4 commits into
masterfrom
annevk/window-close-take-2

Conversation

@annevk

@annevk annevk commented Mar 4, 2019

Copy link
Copy Markdown
Member

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

annevk commented Mar 7, 2019

Copy link
Copy Markdown
Member Author

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.

@domenic domenic left a comment

Copy link
Copy Markdown
Member

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.

Comment thread html/browsers/the-window-object/close-method.window.js Outdated
Comment thread html/browsers/the-window-object/close-method.window.js Outdated
Comment thread html/browsers/the-window-object/close-method.window.js Outdated
@annevk

annevk commented Mar 7, 2019

Copy link
Copy Markdown
Member Author

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

@annevk

annevk commented Mar 7, 2019

Copy link
Copy Markdown
Member Author

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