-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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] Align aborted navigation tests with specification #48751
[wdspec] Align aborted navigation tests with specification #48751
Conversation
async def test_interactive_change_location_throws(bidi_session, inline, | ||
new_tab): | ||
new_url = inline("<div>foo</div>") | ||
url_with_redirect = inline(f"<script>window.location='{new_url}';</script>") | ||
with pytest.raises(error.UnknownErrorException): | ||
await bidi_session.browsing_context.navigate( | ||
context=new_tab["context"], url=url_with_redirect, | ||
wait="interactive") | ||
|
||
|
||
async def test_interactive_change_location_succeeded(bidi_session, inline, | ||
new_tab): | ||
new_url = inline("<div>foo</div>") | ||
url_with_redirect = inline(f"<script>window.location='{new_url}';</script>") | ||
result = await bidi_session.browsing_context.navigate( | ||
context=new_tab["context"], url=url_with_redirect, wait="interactive") | ||
|
||
any_string(result["navigation"]) | ||
assert result["url"] == new_url |
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.
By definition, one of the two tests will necessarily fail. Given that both chrome and firefox pass test_interactive_change_location_throws at the moment, maybe we should only keep this one and updated when the spec is clarified?
f56cce3
to
d9f3ac1
Compare
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.
I was looking at the two similar tests in bidi/browsing_context/navigation_failed/navigation_failed.py, at the moment they expect a navigationFailed
event for similar scenarios. If I understand the spec change correctly, this also wrong? Can you check if they need updating?
I'm working on it from the implementation side: GoogleChromeLabs/chromium-bidi#2856 |
Does this mean you will also update those tests here or will it be another PR? |
closing in favor of #49718 |
Align aborted navigation tests with specification.
WebDriver BiDi requires to succeed the navigation, if it was aborted by another navigation:
browsingContext.navigate
browsingContext.navigationAborted
event).