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

Explicitly require navigation actions to end with top-level context. #100

Closed
wants to merge 1 commit into from

Conversation

sevaseva
Copy link
Contributor

Navigation actions - Get, Back, Forward, Refresh - always, unless they abort the navigation, complete with the current top-level browsing context being the current browsing context. Even if we navigate Back or Forward to a state where a different browsing context was the current browsing context.

Alternative behavior could be for the remote end to "remember"
what was the current browsing context at each of the state
of the "history". I don't support that behavior because I believe
it is more complex in implementation
([speculating] other than WebDriver, browser components don't seem
to already define the notion of the current browsing context
so WebDriver would have to "remember" those for itself [/speculating]).

This suggestion was prompted by the regression (in this yet unspecified behavior)
in chrome/chromedriver:
https://code.google.com/p/chromedriver/issues/detail?id=1106

<p class=note>Navigation actions - Get, Back, Forward, Refresh - always,
  unless they abort the navigation, complete with the <a>current top-level browsing context</a>
  being the <a>current browsing context</a>. Even if we navigate Back or Forward to a state
  where a different <a href=https://html.spec.whatwg.org/#browsing-context>browsing context</a>
  was the <a>current browsing context</a>.

Alternative behavior *could* be for the remote end to "remember"
what was the <a>current browsing context</a> at each of the state
of the "history". I don't support that behavior because I believe
it is more complex in implementation
([speculating] other than WebDriver, browser components don't seem
to already define the notion of the <a>current browsing context</a>
so WebDriver would have to "remember" those for itself [/speculating]).

This suggestion was prompted by the regression (in this yet unspecified behavior)
in chrome/chromedriver:
https://code.google.com/p/chromedriver/issues/detail?id=1106
<a>current top-level browsing context</a> as if <a>Switch to Frame</a>
command was executed with no specified
<a href="https://html.spec.whatwg.org/#child-browsing-context">
child browsing context</a>.
Copy link
Member

Choose a reason for hiding this comment

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

I don’t think we should make a reference to Switch To Frame at all here. If we need some generalised prose related to resetting the current browsing context we should add that as a definition, but I don’t think we do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed,

" as if Switch to Frame
command was executed with no specified

child browsing context
"

can be removed completely. I can update this PR when the other comment in this PR is resolved.

@andreastt
Copy link
Member

I believe this is mostly replaced by #275.

@andreastt
Copy link
Member

@AutomatedTester I believe this can now be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants