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

[Gecko Bug 1599160] Fix a racy constructable stylesheets test. #23951

Merged
merged 1 commit into from Jun 4, 2020

Conversation

moz-wptsync-bot
Copy link
Collaborator

This test is using async_test, while the others are using promise_test,
which are not synchronized with each other.

This test loads a element with the import url stylesheet, which
sets the color property. Color is inherited, so it can affect the
shadow descendants of the trees in the other tests.

Only the following test checks the computed value of the color property,
so in practice the race doesn't happen right now because the url is
never cached.

But with the stylesheet caching improvements, if you hit the cache for
the link, it is fast enough in a way in which you might be running the
following test after the link has loaded, but before the load event
has been dispatched.

Use promise_test to properly synchronize between this test and the
following ones, to avoid flaky failures with cross-document stylesheet
caching.

Differential Revision: https://phabricator.services.mozilla.com/D78052

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1599160
gecko-commit: 79c2788498a8a636a7e64d899cbff590f2304cd0
gecko-integration-branch: autoland
gecko-reviewers: nordzilla

This test is using async_test, while the others are using promise_test,
which are not synchronized with each other.

This test loads a <link> element with the import url stylesheet, which
sets the `color` property. Color is inherited, so it can affect the
shadow descendants of the trees in the other tests.

Only the following test checks the computed value of the color property,
so in practice the race doesn't happen right now because the url is
never cached.

But with the stylesheet caching improvements, if you hit the cache for
the link, it is fast enough in a way in which you might be running the
following test after the link has loaded, but before the load event
has been dispatched.

Use promise_test to properly synchronize between this test and the
following ones, to avoid flaky failures with cross-document stylesheet
caching.

Differential Revision: https://phabricator.services.mozilla.com/D78052

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1599160
gecko-commit: 79c2788498a8a636a7e64d899cbff590f2304cd0
gecko-integration-branch: autoland
gecko-reviewers: nordzilla
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

The review process for this patch is being conducted in the Firefox project.

@moz-wptsync-bot moz-wptsync-bot merged commit 57589b7 into master Jun 4, 2020
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1599160-1 branch June 4, 2020 06:14
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.

None yet

3 participants