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

CSS View Transitions cross-document tests rely on navigating the top-level browsing context #48825

Open
gsnedders opened this issue Oct 25, 2024 · 1 comment

Comments

@gsnedders
Copy link
Member

See, e.g., https://wpt.fyi/results/css/css-view-transitions/navigation/pagereveal-microtask-sequence.html?run_id=5170135061233664&run_id=5204002958737408&run_id=5075857710514176&run_id=5095519668142080

Chrome gives a TIMEOUT, Firefox returns "ERROR message: Document unloaded; maybe test navigated the top-level-browsing context?", Safari raises webdriver.error.NoSuchFrameException from within wptrunner.

Ultimately, we don't support navigating the top-level browsing context; for testharness tests, we have an assert where we expect things to fail if they even make it that far:

assert result_url == test.url, (f"Got results from {result_url}, expected {test.url}")

For reference: this assert goes all the way back to the very first commit which added wptrunner:

assert result["test"] == test.url, ("Got results from %s, expected %s" %
(result["test"], test.url))

For reftests, we don't seem to have anything explicitly checking for this, but this seems likely to be the cause of https://wpt.fyi/results/css/css-view-transitions/navigation/navigation-auto-excludes-reload.html?run_id=5170135061233664&run_id=5204002958737408&run_id=5075857710514176&run_id=5095519668142080 (which fails in Safari as we're waiting for the callback for reftest-wait being removed when the document gets navigated while we wait for the script to return; I'm somewhat surprised at that passing in Chrome — I wonder if there's WebDriver differences here?).

Admittedly, we don't seem to have this limitation documented anywhere, as far as I can see.

I expect this is the cause for most of the harness errors one can see on https://wpt.fyi/results/css/css-view-transitions/navigation?run_id=5170135061233664&run_id=5204002958737408&run_id=5075857710514176&run_id=5095519668142080, though I haven't investigated closely.

I don't know if the View Transitions cross-document tests could reasonably be rewritten to be navigating frames instead, or if this really is just blocked on coming up with some solution in WPT to handle the test page navigating (while handling the risk of somehow ending up with the results from the wrong page, which is not a purely hypothetical concern, as this has happened in various browser CI systems over the years).

cc @jgraham @jonathan-j-lee @WeizhongX on the wptrunner side
cc @noamr @mattwoodrow @vmpstr @khushalsagar on the view transitions side

(Somewhat prompted by web-platform-tests/interop#771, to cross-reference the issues with the tests.)

@noamr
Copy link
Contributor

noamr commented Oct 29, 2024

Thanks @gsnedders, we'll see what we can do about this.

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