-
Notifications
You must be signed in to change notification settings - Fork 3.5k
wdspec: fix navigate relative_url test to use a relative url #54552
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: fix navigate relative_url test to use a relative url #54552
Conversation
Regarding the flakiness of this test on Firefox, this might have started when we switched from wait=interactive to wait=none, but I'm not sure exactly why this is happening. |
Good catch! Note that the Edit: Oh, i missed the above comment where you already mentioned that. Maybe we can find out more details later on wpt.fyi or in our own CI. |
@@ -16,13 +21,13 @@ async def navigate_and_assert(bidi_session, context, url, wait="complete", expec | |||
result = await bidi_session.browsing_context.navigate( | |||
context=context['context'], url=url, wait=wait | |||
) | |||
assert result["url"] == url | |||
assert result["url"] == expected_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.
Can we assert that result["url"].endsWith?(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.
Which situations do you have in mind where this could fail a direct comparison?
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.
it would allow us for removing expected_url
argument
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.
The assertion would be weaker though. If an implementation handles relative navigations incorrectly and navigates to the wrong domain the test won't be able to pick it up.
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.
not a blocker, still LGTM
11f5f07
to
4581ee1
Compare
cc @jgraham could you admin merge this? |
When introducing the shared helper to navigate and assert we missed that this specific test was navigating to a relative URL and we can't use the same url for navigating and the final assertion.
This PR updates the helper to allow to set a custom expected_url and uses this properly in the test_relative_url test.