-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[wdspec] change test_..._closes_browsing_context #49759
[wdspec] change test_..._closes_browsing_context #49759
Conversation
The tests relied on the script closing browsing context which causes "Scripts may only close windows that were opened by a script". The new approach is to close browsing context by a command during actions chain. This approach can be racy though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is specific to handling of actions and when a event handler closes the tab/window. We should not make use of a different BiDi command here, but as you say need to open a new window first by using window.open()
.
Not sure why we set this preference in Firefox by default to change the default behavior which is a bit concerning and I wonder how other wpt tests actually result in when we would change that. @jgraham do you have an idea?
This reverts commit 8708586.
Open context with `window.open` to allow it to be closed by script.
We need to rely on other BiDi commands. Changed approach to open a window via script, which uses |
WPT results are unchanged: |
Thanks for the fix @sadym-chromium! Please note that we have similar tests for WebDriver classic as well. Would you be able to provide a similar PR? |
Waiting for the new window to be loaded in classic is way more tricky. Do you have an idea on how to make it? |
|
The tests relied on the script closing browsing context which causes "Scripts may only close windows that were opened by a script".
Open context with
window.open
to allow it to be closed by script.