Skip to content

Conversation

juliandescottes
Copy link
Contributor

@juliandescottes juliandescottes commented Aug 27, 2025

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.

@juliandescottes
Copy link
Contributor Author

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.

@whimboo
Copy link
Contributor

whimboo commented Aug 28, 2025

Good catch! Note that the test_relative_url test fails intermittently for Firefox in the stability tests job with a pure AssertionError. Do you maybe have an idea what this could be?

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.

@juliandescottes juliandescottes enabled auto-merge (rebase) August 28, 2025 08:25
auto-merge was automatically disabled August 28, 2025 08:50

Pull request was closed

@juliandescottes juliandescottes enabled auto-merge (rebase) August 28, 2025 08:50
@@ -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
Copy link
Contributor

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)?

Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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

@juliandescottes
Copy link
Contributor Author

juliandescottes commented Aug 29, 2025

cc @jgraham could you admin merge this?

@jgraham jgraham disabled auto-merge September 4, 2025 07:50
@jgraham jgraham merged commit 1ebd4ad into web-platform-tests:master Sep 4, 2025
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants