web-platform-tests / web-platform-tests/wpt
Flaky tests due to lack of `class="reftest-wait"` in tests using `requestAnimationFrame` etc.
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 6.2k
- Forks
- 3.9k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 586
Description
I found some tests are flaky due to lack of class="reftest-wait" on the document element, while the test uses requestAnimationFrame() etc. Some tests even use <script src="/common/reftest-wait.js"> assuming the script will add and remove reftest-wait.
Two examples:
https://github.com/web-platform-tests/wpt/blob/master/svg/styling/invalidation/nth-child-of-class.svg
https://github.com/web-platform-tests/wpt/blob/master/css/css-position/fixed-z-index-blend-ref.html
Some thoughts:
- How about letting reftest-wait.js automatically add
class="reftest-wait"? - A validation rule checking for some wrong pattern may be helpful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the behavior of /common/reftest-wait.js and the two cited tests: svg/styling/invalidation/nth-child-of-class.svg and css/css-position/fixed-z-index-blend-ref.html. Determine how requestAnimationFrame() tests signal readiness, then define and validate a consistent fix for the flaky pattern; done means the affected tests no longer race and the proposed validation is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- testing, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100