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

Add an RFC for add_top_level_completion_handler #168

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gsnedders
Copy link
Member

@gsnedders gsnedders commented Oct 13, 2023

webkit-commit-queue pushed a commit to gsnedders/WebKit that referenced this pull request Oct 18, 2023
… handler

https://bugs.webkit.org/show_bug.cgi?id=259409
rdar://problem/112683033

Reviewed by Jonathan Bedard.

Previously, we were considering the test as having to run to completion
when any testharness.js completion handler first ran (which was
sometimes that of the frame within the opened window; the nondeterminism
here just adds flakiness to the already bad behaviour).

Instead, only output anything for the top-level completion handler, as
all results should be passed up to it. Note wptrunner with the WebDriver
or Marionette executors only ever pays attention to the top-level
completion handler (as they only pay attention to the top-level frame &
window), thus they don't have any flakiness like this.

Ideally testharness.js would have an API we could use for this; I've
filed an RFC at web-platform-tests/rfcs#168 for
this, but there's no reason not to do the simple fix ourselves, as at
least for now this is a strict progression. (It would stop being a
strict progression if at some point testharness.js started allowing
fetch_tests_from_window() with a window with noopener.)

It seems likely we have other tests that are marked as flaky because of
it, but alas there's no easy way to find what tests will have been fixed
by this.

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade-cors.https-expected.txt:
* LayoutTests/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade-cors.https.html:
* LayoutTests/imported/w3c/web-platform-tests/cookies/partitioned-cookies/partitioned-cookies.tentative.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-function-parent-then-fragment-expected.txt:
* LayoutTests/platform/wk2/TestExpectations:
* LayoutTests/resources/testharnessreport.js:

Canonical link: https://commits.webkit.org/269483@main
@gsnedders
Copy link
Member Author

In the case of no substantive disagreement the RFC is considered accepted after 1 week.

…and we've had no substantive disagreement in two weeks, so I guess that means this is accepted despite nobody having reviewed it? 🤨

Copy link
Contributor

@Ms2ger Ms2ger left a comment

Choose a reason for hiding this comment

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

No obvious objections from my side

rfcs/add_top_level_completion_handler.md Outdated Show resolved Hide resolved
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
@jcscottiii
Copy link
Contributor

@jgraham
Copy link
Contributor

jgraham commented Feb 6, 2024

Per the discussion in https://github.com/web-platform-tests/wpt-notes/blob/47c3ea1a941c0b0f78869ff2d00a2e2f93594636/minutes/2023-11-07.md?plain=1#L24 we might want to try a different implementation approach. We likely need to try with existing tests to see which approach is most robust.

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.

None yet

4 participants