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

"Switch To Parent Frame" has to check for top-level browsing context before the parent browsing context open check #1544

Closed
whimboo opened this issue Sep 14, 2020 · 3 comments

Comments

@whimboo
Copy link
Contributor

whimboo commented Sep 14, 2020

This is a follow-up from issue #1539.

If the currently selected browsing context is already the top-level browsing context the call to "Switch To Parent Frame" should be a no-op. That's how the Chromedriver behaves currently. But right now when reading the spec the first step of the remote steps will actually error out:

https://w3c.github.io/webdriver/#switch-to-parent-frame

If the current parent browsing context is no longer open, return error with error code no such window.

If the current browsing context is already the top browsing context, the parent will be null. As such the command should return a "no such window" error.

CC'ing @jgraham for his opinion.

@jgraham
Copy link
Member

jgraham commented Sep 14, 2020

Oh I misunderstood this when you mentioned it on matrix; I was looking at the later steps. This is clearly a spec bug, "no longer open" isn't a state that null can have. So I don't think the spec really says one way or another what should happen it's just broken.

@whimboo
Copy link
Contributor Author

whimboo commented Sep 15, 2020

Ok, so for the upcoming tests I will keep the behavior of current webdriver clients that is just a no-op. We can refine the tests later whenever we have made a change here.

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Oct 21, 2020
…nt Frame" if current browsing context is already the top-level one. r=webdriver-reviewers,jgraham

Tests for proposed WebDriver changes:
w3c/webdriver#1544

Differential Revision: https://phabricator.services.mozilla.com/D93763
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 22, 2020
…urrent browsing context is already the top-level one.

Tests for proposed WebDriver changes:
w3c/webdriver#1544

Differential Revision: https://phabricator.services.mozilla.com/D93763

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1671622
gecko-commit: 8c6fc4ee769c8069381ca80846359a718f62535b
gecko-reviewers: webdriver-reviewers, jgraham
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 22, 2020
…urrent browsing context is already the top-level one.

Tests for proposed WebDriver changes:
w3c/webdriver#1544

Differential Revision: https://phabricator.services.mozilla.com/D93763

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1671622
gecko-commit: 8c6fc4ee769c8069381ca80846359a718f62535b
gecko-reviewers: webdriver-reviewers, jgraham
@whimboo
Copy link
Contributor Author

whimboo commented Oct 22, 2020

Fixed by #1556.

@whimboo whimboo closed this as completed Oct 22, 2020
jamienicol pushed a commit to jamienicol/gecko that referenced this issue Oct 24, 2020
…nt Frame" if current browsing context is already the top-level one. r=webdriver-reviewers,jgraham

Tests for proposed WebDriver changes:
w3c/webdriver#1544

Differential Revision: https://phabricator.services.mozilla.com/D93763
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants